Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy TinyMCE get focus and blur event, when user jump from other input field?
    text
    copied!<p>Im have a title input field and an tinymce4 textarea. </p> <p>In the tinymce init i defined <strong>blur</strong> and <strong>focus</strong> event listeners (coffescript).</p> <pre><code> tinymce.init( $.extend {}, tinyMceDefaultConfig, editor_selector:"tinymce-question" setup: (editor) -&gt; editor .on 'init', (e)..... .on 'focus', -&gt; console.log('focus') .on 'blur', -&gt; console.log('blur') </code></pre> <p>When i go into the tinymce textarea field, it fire only <strong>focus</strong> event. Works fine.</p> <p>But when i go from the title input field to the tinymce (with mouse event), it fire <strong>focus</strong> and <strong>blur</strong> events.</p> <p>Why? Or how do I avoid this?</p> <p><strong>UPDATE</strong>:</p> <p>Here an example. Is it a bug?</p> <p>When I click into the textarea only the focus fired. When I am in the input field and then click into the textarea, focus and blur fires. </p> <pre><code> &lt;html&gt; &lt;head&gt;&lt;!-- CDN hosted by Cachefly --&gt; &lt;script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"&gt;&lt;/script&gt; &lt;script&gt; tinymce.init({ selector:"textarea", setup: function(editor) { editor.on('focus', function() { console.log('focus'); }); editor.on('blur', function(){ console.log('blur'); }) } }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" name="fname"&gt; &lt;textarea&gt;Your content here.&lt;/textarea&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><a href="http://jsfiddle.net/UvQ8W/" rel="nofollow">JSFIDDLE</a></p> <p><strong>UPDATE:</strong></p> <p><a href="http://jsfiddle.net/UvQ8W/3/" rel="nofollow">Updated JSFIDDLE</a></p> <p>The focus fired now one time, but the blur do not fire anymore.</p> <p><strong>UPDATE2:</strong></p> <p>I see, this problem is only in Chrome. In Firefox and Safari it works fine.</p> <p><strong>UPDATE3:</strong></p> <p>It is fixed with the actual Nightly build. I dunno in which version it will be merged.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload