title: "Uncaught ReferenceError: t is not defined" while trying to remove a div which has a tinymce instance
body: <p>Here is the issue I am facing</p>
  
  <ol>
  <li>I have a div which contains an instance of tinymce. </li>
  <li>This instance of tinymce is within an unordered list within the same div</li>
  <li>When I try to delete the main div on click of a button I am getting the
  "Uncaught ReferenceError: t is not defined" error.</li>
  <li>But when I double click the button the div gets removed. But I want the div removed on
  the first click.</li>
  <li>I have tried tinymce.execCommand('mceRemoveControl', false, tinymceId); ( tinymceID
  is the id of the tinymce textarea ) To remove the instance of tinymce but to no avail</li>
  </ol>
  
  <p>Below is the code I am using to remove the div</p>
  
  <pre><code>$('div.form').on('click','a.cancel-btn',function(e){
      var kk = $(this);   
      e.preventDefault();
  
      $('.dialog').html('Are you sure you wish to delete this asset ? Selecting \'Yes\' will delete this asset.');    
      $('.dialog').dialog({
          buttons:{
              "Yes": function() {
                  tinymceId = kk.closest('div.box2').find('textarea').attr('id');
                  if (typeof(tinymceId) == 'string') {
                      if (tinyMCE.getInstanceById(tinymceId) != null)
                      {
                          tinymce.triggerSave();
                      tinymce.execCommand('mceFocus', false, tinymceId);
                      tinymce.execCommand('mceRemoveControl', false, tinymceId);
                          //tinyMCE.execCommand('mceFocus', false, tinymceId);
                          kk.closest('div.box2').find('textarea.tinymce_new').tinymce().remove();                   
                      }
  
                      kk.closest('div.box2').find('textarea').remove();
                      kk.closest('div.box2').find('textarea').remove();
  
                  } 
                  //tinyMCE.myClass.remove();
                   kk.closest('div.box2').remove();
                  $(this).dialog("close");
                  kk.click();
              },
              "Close": function() { $(this).dialog("close"); }
          }
      });
  });
  </code></pre>