我正在使用CKEDITOR 4,并且每次鼠标移到元素外部时,实例都会失去焦点。
预期的行为
当前行为
我的页面上没有任何悬停侦听器,也没有焦点侦听器。但是我有一个点击和启动听众。
代码如下:
HTML
<div class="text">
<div class="text-inner">
<label for="my_textarea" class="input-label">My Text</label>
<textarea name="my_textarea" id="my_textarea" placeholder="Write your text..."></textarea>
</div>
</div>
JavaScript
CKEDITOR.config.allowedContent = true;
CKEDITOR.config.format_tags = 'h1;h2;div;p';
CKEDITOR.config.baseFloatZIndex = 100003;
CKEDITOR.replace( 'my_textarea', {
toolbarGroups: [
{"name":"basicstyles","groups":["basicstyles"]},
{"name":"links","groups":["links"]},
{"name":"paragraph","groups":["list","blocks"]},
{"name":"document","groups":["mode"]},
{"name":"styles","groups":["styles"]},
]
} );
// ... somewhere else in the code
$(document).on('click touchstart', '.close', function (e) { /* show/hide some elements */ });