引导程序模式中的tinymce:滚动上的错误下拉位置 [英] tinymce in bootstrap modal: wrong dropdown position on scroll

查看:469
本文介绍了引导程序模式中的tinymce:滚动上的错误下拉位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在引导程序模版中使用了tinymce,但是页面滚动上的tinymce下拉菜单存在问题:基本上,它们的绝对位置没有更新,并且显示在错误的位置.我准备了 jsbin 来显示问题:只需打开颜色选择器并滚动页面.

I'm using tinymce inside a bootstrap modal but I'm having a problem with tinymce dropdowns on page scroll: basically their absolute positions are not updated and they are shown in the wrong position. I prepared a jsbin to show the problem: just open the color picker and scroll the page.

有任何提示吗?任何人都有相同的问题,并设法使其起作用?

Any hints? Anyone had the same issue and managed to make it work?

谢谢

推荐答案

除了user206056 CSS答案:

In addition to user206056 css answer:

.mce-menu {position:fixed !important}

尝试添加到TinyMCE的init方法中,添加ui_container参数并将其设置为引导程序模式的选择器.

try adding to your TinyMCE init method, adding the ui_container parameter and set it to the selector of your bootstrap modal.

类似的东西:

 tinymce.init({
    selector: '.my-mce-selector',
    ui_container: '.modal', // bootstrap modal
    // your other options ... 
});

尽管这并非在所有情况下都有效(例如inline: true),但您可能需要遵循GitHub 发出以进行更新.

Although, this doesn't work in all cases (like inline: true), you may want to follow the GitHub issue for updates.

这篇关于引导程序模式中的tinymce:滚动上的错误下拉位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆