单击任意位置以在 CKEditor 中聚焦

发布于 2024-08-17 05:07:39 字数 510 浏览 4 评论 0原文

在 FireFox 中,我可以单击 CKEditor (350px x 250px) 中的任意位置,将焦点放在编辑器顶部的单个文本段落上。然而,在 IE6 中(我知道,但我们的客户坚持)我必须直接单击段落顶部以将光标聚焦并随后编辑文本。

CKEditor 创建以下内容:

<iframe>
<html>
   <head>...</head>
   <body spellcheck="true">
      <p>some text to edit</p>
   </body>
</html>
</iframe>

我怀疑这是 IE6 问题;有什么想法吗???

编辑: 显然是一个已知问题。

In FireFox, I can click anywhere in CKEditor (350px x 250px) to place focus on a single paragraph of text located at the top of the editor. However, in IE6 (I know, but our client insists) I must click directly atop the paragraph to focus the cursor and subsequently edit the text.

CKEditor creates the following:

<iframe>
<html>
   <head>...</head>
   <body spellcheck="true">
      <p>some text to edit</p>
   </body>
</html>
</iframe>

I suspect this is an IE6 problem; any ideas???

EDIT:
Apparently a known problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

醉生梦死 2024-08-24 05:07:39

这是一个已知问题,显然已在 v3.1 中修复。

This is a known problem apparently fixed in v3.1.

百合的盛世恋 2024-08-24 05:07:39

我刚刚在 4.2.2 版本和 IE 8 中遇到了同样的问题,并且能够在 instanceReady 事件中使用此代码修复它。当用户单击 CKEditor 编辑区域中的任意位置时,它会设置焦点。

CKEDITOR.on( 'instanceReady', function( ev ) {
    $('iframe.cke_wysiwyg_frame', ev.editor.container.$).contents().on('click', function() {
        ev.editor.focus();
    });
}); 

I just had the same problem with the 4.2.2 release and IE 8 and was able to fix it with this code in the instanceReady event. It sets the focus when the user clicks anywhere in the CKEditor edit region.

CKEDITOR.on( 'instanceReady', function( ev ) {
    $('iframe.cke_wysiwyg_frame', ev.editor.container.$).contents().on('click', function() {
        ev.editor.focus();
    });
}); 
灵芸 2024-08-24 05:07:39

正如票证日期所示,该错误仍然存​​在,但在 3.1 版本中尚未修复。

As the ticket date shows, the bug is still present, it hasn't been fixed in the 3.1 release.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文