--
Ticket URL: <http://dev.ckeditor.com/ticket/10382>
CKEditor <http://ckeditor.com/>
The text editor for the Internet
* status: new => closed
* resolution: => invalid
Comment:
I can't confirm this.
I have tried two approaches here to attach focus event to editor in
massive inline creation sample. In both cases once events have been
registered they worked on click and on tab.
{{{
CKEDITOR.on( 'instanceReady', function( event ) {
event.editor.on('focus', function(evt){
console.log(CKEDITOR.currentInstance);
});
});
}}}
{{{
window.setTimeout(function(){
for (var propertyName in CKEDITOR.instances) {
if ( CKEDITOR.instances.hasOwnProperty(
propertyName ))
CKEDITOR.instances[propertyName].on('focus', function(evt){
console.log(CKEDITOR.currentInstance);
});
}
}, 2000);
}}}
@Mandeep Jain I'm closing this ticket as invalid but if I have missed
anything and you don't agree please let me know.
--
Ticket URL: <http://dev.ckeditor.com/ticket/10382#comment:1>
Comment (by Mandeep Jain):
@j.swiderski I used the same approach, the only difference is that my
timeout is 100ms.
Initially I was doing it without setTimeout which was not working. Then I
set it to 0ms and 10ms which still gave me unpredictable results. Setting
it to 100ms is working for now.
Can we achieve this without setTimeout?
--
Ticket URL: <http://dev.ckeditor.com/ticket/10382#comment:2>
Comment (by j.swiderski):
Yes it can be achieved. Please see first example.[[BR]]
On each instance ready you can attach focus event or whatever you want.
--
Ticket URL: <http://dev.ckeditor.com/ticket/10382#comment:3>