Fixing an IE 7 bug in mm_menu.js navigation
We’re proud (even stubborn) hand-coders, so we don’t often get the opportunity to delve into the JavaScript libraries deployed by using applications such as Dreamweaver.
Recently, however, we were contacted with an IE7 bug: a navigation system that was using the mm_menu.js library appeared to be only showing the first word of each option.
At 800 lines of dense JavaScript, this was not going to be fun to debug. Fortune, however, smiled upon us in the form of an invidual named Hiroto, who posted the following on the Cre8asite Forums:
function writeMenus(container) {
.... some code here ....
menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
var itemProps = ‘’; <= CHANGE THIS LINE TO => var itemProps = ‘white-space:nowrap;’;
if( menu.fontFamily != ‘’ ) itemProps += ‘font-family:’ + menu.fontFmaily+’;’;
.... some code here ....
}
You should find this spot around line 163 of mm_menu.js. The change worked a charm. Thanks Hiroto!


Comments
Be the first to comment on this post!