#11 horizontal submenu disappears on IE

open
nobody
5
2004-11-30
2004-11-30
Greg Rundlett
No

Using version 3.2.0-rc of phplayersmenu, and Microsoft
Internet Exploder version 6.0.2800, the sub-menus of
horizontal menus disappear immediately on mouseover,
apparently only at smaller window dimensions, only after
the page is fully loaded.

This bug can not be reproduced using Mozilla on Linux,
nor Mozilla on Windows. (surprise, it only affects
Windows IE)

To reproduce this bug:
1. visit http://phplayersmenu.sourceforge.net/
2. Adjust browser window so that it is at least 700px
wide. (At this width, the entire horizontal menu is
available without a horizontal scrollbar in IE)
3. Mouse over the menu item labelled 'Project Page on
SF.net', and move the mouse over the sub-menus.
(Notice how they cascade from left to right, and remain
visible as long as the mouse is positioned over any sub-
menu item.)
4. Now resize the browser window so that it is only
500px wide. (At this width, the right scrollbar is
immediately adjacent to the menu item labelled 'Project
Page on SF.net')
5. Repeat step 3. The sub-menus will cascade to the
left in order to appear on the visible screen 'canvas'.
Notice how the sub-menus appear while the mouse is
over the main menu, but immediately disappear when
you move the mouse to hover over the sub-menus.
6. IMPORTANT: At any window size, the sub-menus
WILL work as expected until all images are downloaded
for the page. Once the menu images are fully
downloaded (and presumably at the point that the script
loaded = 1 is evaluated?), the bug will begin to manifest
itself.
7. Repeat step 2 and 3 without reloading the page, and
the sub-menus work again.

Discussion

  • Greg Rundlett
    Greg Rundlett
    2004-11-30

    Logged In: YES
    user_id=143603

    I tried to use a plain menu.txt file (no menuicons), but the
    same bug pattern emerges.

     
  • DCohen
    DCohen
    2004-12-14

    Logged In: YES
    user_id=1175239

    major bug and should have its priority increased.

     
  • DCohen
    DCohen
    2004-12-17

    Logged In: YES
    user_id=1175239

    Just realized the same bug exists in 3.0.2

     
  • Marco Pratesi
    Marco Pratesi
    2004-12-23

    Logged In: YES
    user_id=65709

    > major bug and should have its priority increased.

    Please, be calm :-)

    First of all, "major bug" *of msie*, not of phplm :-P
    To realize that it's (one of the countless) msie bug,
    try the following:

    1 - cut the DTD declaration at the beginning of index.php;
    the problem disappears; it seems that it is another bug
    that emerges with doctype switching (msie has tons
    of bugs when it switches to "modern" behaviour, as it is
    evidently not a modern browser >:-P)

    2 - edit libjs/layersmenu.js commenting out the line
    window.onresize = resizeHandler;
    the problem disappears again; evidently, msie6 triggers
    a window.onresize event even though the window has not
    resized at all! I have played a bit with the code to understand
    *where the hell* he thinks that the window resizes; I have
    found the parts of code where this happens, but I have still
    not completely identified the problem.

    Anyway, here it is a(nother) workaround that seems
    to work for me:

    libjs/layersmenu.js
    -------------------
    ...
    if (IE5) { // Workaround needed for crappy msie6
    origWidth = window.innerWidth;
    origHeight = window.innerHeight;
    }
    function resizeHandler()
    {
    if (IE5) { // Workaround needed for crappy msie6
    if (window.innerWidth == origWidth &&
    window.innerHeight == origHeight) {
    return;
    } else {
    origWidth = window.innerWidth;
    origHeight = window.innerHeight;
    }
    }
    ...

    Try this workaround and let me know if it works for you
    without side effects.

    Marco Pratesi

     
  • DCohen
    DCohen
    2005-01-05

    Logged In: YES
    user_id=1175239

    been running the workaround for a week now without problems,
    Thanks Marco, sorry to be such a pain...great work!

     
  • Erik Spaan
    Erik Spaan
    2007-01-09

    Logged In: YES
    user_id=947113
    Originator: NO

    The Workaround in libjs/layersmenu.js works also fine for me.
    Thanks.