Hi,
In CKEditor 3.6.4, the blur event is fired every time the text area is leaved. Which means it is also fired when you open a dialog. This is causing me some problem as I need to do some stuff on the blur/focus of the whole editor. The current blur event is fired way too often.
Is there another event that a can listen to that would do that ?
Or is there a way to know if the blur/focus comes from outside the editor ?
I've found this post on stackOverFlow but I would like a cleaner way if possible. Plus I don't think this solution would work for the focus.
http://stackoverflow.com/questions/2601 ... and-dialog
Thanks for your help!
JF
EDIT :
Here's what I need to do on focus and blur.
On focus I need to expand the toolbar.
On blur I need to do an ajax query to save the value and collapse the toolbar.
These things were working well with FCKeditor.
Wed, 10/31/2012 - 15:44
#1
Re: Blur and focus fired when opening/closing dialogs
What I do is I check if the mouse is outside the editor area before doing the blur. If it's not outside the editor area it means the blur event comes from a dialog opening so I do nothing.
Re: Blur and focus fired when opening/closing dialogs
In CKEditor 4 which will be release very soon we fixed this issue differently. There's so called focus manager which listens on focus/blur on all UI parts (we're registering them manually - no logic here). If there's a blur which isn't followed within 200ms by focus, focus manager changes editor's state to blurred.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Still having blur issues with latest version
I realize that this is an old thread, but I'm using the lastest version of CKEditor, and there still seem to be issues with the blur event.
I'm loading these versions from CDN:
.script("//cdn.ckeditor.com/4.4.6/full-all/ckeditor.js")
.script("//cdn.ckeditor.com/4.4.6/full-all/adapters//jquery.js")
I'm seeing the blur event firing when I click on the toolbar itself (not one of the buttons/controls within it), and also when a dialog opens.
I'm having a devil of a time trying to come up with a reliable test for whether a dialog is open/opening. The only one I'm dealing with right now is the "Link" dialog, but I'm guessing the same issue will apply to others.
What I'm trying to do is save the text when the user truly blurs out of the editor. That would mean leaving it to move to some other element in the page, but not by clicking on anything in the toolbar, which means they are still working on the text.
Is this a known issue? I see a lot of posts out there where people have come up with hacks, but none look reliable to me. I'm happy to provide more information if it would be helpful.
Thanks,
M.