I have a header input box and a tinymce4 text box.
In tinymce initialization, blur and focus event listeners (coffescript) are defined.
tinymce.init( $.extend {}, tinyMceDefaultConfig, editor_selector:"tinymce-question" setup: (editor) -> editor .on 'init', (e)..... .on 'focus', -> console.log('focus') .on 'blur', -> console.log('blur')
When I go to the tinymce text area field, it only triggers focus . It works great.
But when I move from the header input field to tinymce (with mouse event), it triggers focus and blur .
Why? Or how to avoid this?
UPDATE
Here is an example. This is mistake?
When I click on the text box, only the focus fires. When I am in the input field, then click in the textarea, focus and blur area.
<html> <head> <script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script> <script> tinymce.init({ selector:"textarea", setup: function(editor) { editor.on('focus', function() { console.log('focus'); }); editor.on('blur', function(){ console.log('blur'); }) } }); </script> </head> <body> <input type="text" name="fname"> <textarea>Your content here.</textarea> </body> </html>
JSFIDDLE
UPDATE:
Updated JSFIDDLE
Focus fires once, but blurring no longer fires.
UPDATE2:
I see this problem only in Chrome. It works great on Firefox and Safari.
Update3:
It is fixed using the actual Nightly assembly. I do not know in which version it will be combined.