Opened 11 years ago

Last modified 11 years ago

#10670 confirmed Bug

Inline CKeditor steals focus

Reported by: Mandeep Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0 Beta
Keywords: Webkit Cc:

Description

I have a div with inline ckeditor on it and also an input box. when the page loads, i assign the focus on the input box, but it seems that the ckeditor steals the focus. If the inline ckeditor is not present, the focus stays on the text box. How can I fix this?

here is the fiddle demonstrating the issue. http://jsfiddle.net/FLZhn/3/

P.S. I am using CKEditor version 4.0.2 and Chrome 28

Attachments (1)

inlineall2.html (6.1 KB) - added by Jakub Ś 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by Jakub Ś

Keywords: Webkit added
Status: newconfirmed
Version: 4.0.24.0 Beta

I was able to reproduce this problem in Webkit browsers only from CKEditor 3.0.

Please see attached file.

Using code like document.getElementById("input_box").focus(); doesn't work. When I use something like setTimeout(function(){document.getElementById("input_box").focus();}, 500); then it works.
In my computer when I used in Chrome setTimeout(function(){document.getElementById("input_box").focus();}, 200); I could see input element gaining focus for a moment and then losing it. So the author is rather right that editor steals focus.

Changed 11 years ago by Jakub Ś

Attachment: inlineall2.html added

comment:2 Changed 11 years ago by Mandeep

Though I was not able to reproduce it in Firefox 22, I was able to reproduce it in IE9. Can you also check on this? Thanks :)

comment:3 Changed 11 years ago by Mandeep

Using code like document.getElementById("input_box").focus(); doesn't work because it is too fast to see. I debugged and found out that the CKEditor code takes around 250 - 300ms(results nay vary as I was running code on my localhost) to execute. So if I have a timeout of more than 300ms, I am putting focus after the code has executed.

Also, after CKEditor takes away the focus, and I minimize the window and open again, I can see the focus in the text box. I could not understand this behaviour but probably you could.

Hope this helps :)

comment:4 Changed 11 years ago by Jakub Ś

I wasn't able to reproduce this problem i Firefox and IE when using attached sample. Seems only Webkit is affected.

comment:5 Changed 11 years ago by Mandeep

Hi guys,

Can I please get a update on this? Thanks :)

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy