Hiermenus Go Forth, XXVII - DHTML Lab | 4
Hiermenus Go Forth, XXVII:
Version 4.2.1 - The Complete Script (Full-Window)
DOM Browser Changes
Standards-compliant Mode
Oops! We forgot to adapt for standards-compliance mode in Version 4.2. Consequently, there were minor scrollbar positioning problems in IE6. These have been fixed and apply to IE5Mac in standards-compliance mode as well.
Scrollbar Image Positioning
When IE5Mac was in standards-compliance mode, there were problems with the scrollbar up/down image positioning and z-index. Instead of figuring out a workaround, the image was changed to be a positioned element and not in-line, avoiding all positioning problems, since we can now position it through HM. This change is not conditional for IE5Mac, is a general improvement, and so applies to all DOM browsers.
NS6 Flicker
When a scrollable child menu was visible, mousing over the parent item element would cause the menu to flicker. That is, it was being visibly resized while displayed.
This was caused by multiple mouseover/mouseout events being fired in the item by its child nodes (the displayed text and the "more" image.) In HM4.2, when a child menu is to be displayed, it is first restored to its original size, then resized to stay within the browser window confines. NS6 renders slower than IE, so if an additional mouseover is fired while the menu is visible, you can actually see the resizing taking place, causing a flicker. In IE this is unnoticeable even on slow systems. In HM4.2.1, visible scrollable menus are not physically resized unless necessary, since the script now compares the needed-size to the original-size using a variable that stores the original size.
IE4 Legacy Code
The IE "bubbling" event model can be problematic when the events are mouseover and mouseout. How these events work and their effect on HM were discussed in great detail in Version 1.0 of HM.
In order to avoid the "flicker" in IE4, we added the code discussed in the Version 1.0 article. IE5 and NS6, although they use event models similar to IE4, do not display the flicker because internally they do the check we were forced to do manually in HM1.0. Consequently, the code snippets "left-over" in HM_ScriptDOM.js from when all browsers used the same code base is unnecessary and has been removed.
IE5+ Memory Leak
In keeping with our memory leak fix introduced in Version 4.1.1, the variables referring to the scrollbar elements are nulled upon page exit (onunload.)
On the next page, a few more changes.
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: February 19, 2002
Revised: February 19, 2002
URL: https://www.webreference.com/dhtml/column63/3.html