TinyMCE 3.0.5 Drop-down Menu Problem
Monday, March 31st, 2008I just ran into this today while I was updating the TinyMCE editor in WebTree. I noticed that any drop-down menus created from the “Select Style” or “Select Formatting” options would create a 1-pixel wide “menu” instead of an actual menu in Firefox. Awesome! I looked at the HTML it was generating, and it seemed to include an inline style setting the menu DIV to be 0 pixels wide with a 1px border.
I’m not sure why it was doing this.
In Safari, it would generate the menu correctly the first time you clicked on it. Subsequent clicks to show the drop-down menu resulted in a increasingly narrow menu-width, until about the 5th click, at which point we’d hit the 0 pixel limit.
After much wasted time looking through the source code and finding nothing, I found a hint to an alternate solution in the API to the function that writes out the menu. There’s a new setting, called use_native_selects; that apparently was just added in this version. It looks like it is set to true by default, which was causing it to attempt some unnecessary crap writing out a JS menu instead of the browser-specific drop-down menu.
I added this line to my tinyMCE.init({}) settings:
use_native_selects: true,
And the problem was solved. Not as uniform an experience, but that’s ok. It’s functional, and that’s all I really care about. Not sure if there’s any other reports about this bug, but hopefully this will save you some time. Pretty annoying new feature, though, isn’t it?




