CKEditor:工具栏下拉列表线外打开

CKEditor:工具栏下拉列表线外打开,ckeditor,ckeditor4.x,Ckeditor,Ckeditor4.x,我在我的网页上使用内联编辑器。除了在模态中,这在任何地方都可以完美地工作。 发生的情况是,当单击工具栏时,工具栏中的下拉列表显示比工具栏其余部分高50-200px。ex样式或字体选择。 我不明白为什么!错误只存在于这个模式中,而不存在于其他任何地方。 有人知道为什么吗?是CSS继承吗?是我在渲染ckeditor之后渲染ckeditor上方的元素吗 我的初始化如下所示: <div class="text-and-toolbar"> <div id="<%= UID %

我在我的网页上使用内联编辑器。除了在模态中,这在任何地方都可以完美地工作。 发生的情况是,当单击工具栏时,工具栏中的下拉列表显示比工具栏其余部分高50-200px。ex样式或字体选择。 我不明白为什么!错误只存在于这个模式中,而不存在于其他任何地方。 有人知道为什么吗?是CSS继承吗?是我在渲染ckeditor之后渲染ckeditor上方的元素吗

我的初始化如下所示:

<div class="text-and-toolbar">
   <div id="<%= UID %>-cktool" class="ckeditor-toolbar-div hidden"></div>
   <div class="text-field" id="<%= UID %>" data-fieldid="<%= FieldId %>">
   <div class="ckEditor read-only-content" contenteditable="true" id="<%= UID %>-textarea"><%= Content %></div>
</div>
config.js中的工具栏:

config.toolbar =
[
    { name: 'clipboard', items: ['Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo'] },
    { name: 'editing', items: ['Find', 'Replace', '-', 'SelectAll'] },
    { name: 'colors', items: ['TextColor'] },
    { name: 'insert', items: ['Table', App.currentUser.isSuperAdmin ? 'Image' : ''] },
    { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', '-', 'RemoveFormat'] },
    { name: 'paragraph', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
    { name: 'links', items: ['Link', 'Unlink', 'Anchor'] },
    { name: 'plugin', items: ['SpellChecker', 'Scayt', 'Sourcedialog'] },
    { name: 'styles', items: ['Styles', 'Format', 'Font', 'FontSize'] }
];
更新: 所以我找到了原因,但没有找到解决办法。 模态有一个滚动条(主体内容比模态长)。
当在浏览器中编辑与模式相同长的内容时,它可以工作。

修复:必须从

 position: absolute;
致:

 position: absolute;
 position: static;