WordPress’ TinyMCE Popup Width In Firefox

I’m surprised there isn’t much about this online.. although I admit my search wasn’t very comprehensive

Anyway, for a while now I’ve been a bit annoyed with the TinyMCE editor in WordPress.. for example, when you click the “Insert/edit link” button on the toolbar, a popup window is launched which proceeds to resize itself to be a less than useful width

Apparently according to one of the developers of TinyMCE in this thread, it’s down to Firefox using the status bar width when it shouldn’t

Anyway, the fix is as follows:

Just after the statements below in tiny_mce_popup.js

   // Netscape 7.1 workaround
   if (this.isWindow && tinyMCE.isNS71) {
      window.resizeBy(0, 10);
      return;
   }

Add the following:

   // Gecko workaround
   if (this.isWindow && tinyMCE.isGecko) {
      window.resizeBy(20, 10);
      return;
   }

That seems to work alright and resize the window to a useable width!

8 Responses to “WordPress’ TinyMCE Popup Width In Firefox”

  1. Bramus! Says:

    Found this by accident whilst searching for sth else, but still needing this handy workaround due to some clients at work asking to fix it ;)

    tnx!

  2. Greg Says:

    For some reason this doesn’t work for me.
    The window opens at a reasonable size and then automatically shrinks to an unamanagable as soon as its finished loading.

    any ideas?

  3. Mark Says:

    The pre-modified javascript is probably still cached - you should clear the browser cache and try again after making the modifications above

  4. Gaddman Says:

    Thanks, this helped me a lot.

  5. HM2K Says:

    Hi mark,

    How’s it going? Long time no speak.

    Fantastic to solved this problem.

    Keep up the good work!

  6. links for 2007-03-09 « test Says:

    [...] influenced dot net » Blog Archive » WordPress’ TinyMCE Popup Width In Firefox firefoxでtinyMCEで開いた小窓のサイズがおかしいのを直すヒント。 (tags: tinymce wysiwyg tips) [...]

  7. Senta Says:

    YESSSS THANKS A LOT

    It’s work fine for me !
    Thank’s for help !

  8. Khairul Faizi Says:

    Work for me after I cleared the browser cache as suggested by Mark. Thanks for the tip

Leave a Reply