title: TinyMCE 4 insert link form fields disabled
body: <p>I'm using the <a href="https://github.com/spohlenz/tinymce-rails" rel="nofollow">tinymce-rails</a> gem which uses TinyMCE 4 and I'm loading the <code>link</code> plugin and all this is initiated after/in a colorbox popup.</p>
  
  <p>TinyMCE editor is working perfectly but the link button brings up a dialog to add/edit a link, but none of the fields except the <em>target</em> are available for editing.</p>
  
  <p>below is the related code: </p>
  
  <pre><code>setup_new_message: -&gt;
    tinyMCE.init
      selector: '.tinymce'
      plugins: "textcolor link"
      menubar: false
      toolbar: "formatselect | fontselect | bold italic underline | forecolor | alignleft aligncenter alignright | bullist numlist | link"
      height: 250
  
    $(document).on 'focusin', (e) -&gt;
      if $(e.target).closest(".mce-window").length
        e.stopImmediatePropagation()
  </code></pre>
  
  <p>I found the $(document).on 'focusin' in other stackoverflow question/answers but this is not working for me. It does fire the <code>e.stopImmediatePropagation()</code> but it is not working as everyone said it would.</p>
  
  <p>Any thoughts? Thanks in advance.</p>