I've just upgraded to the latest version (5.69, as of this morning), and I'm noticing some odd behavior with combinations of openonclick, closeonclick, keepalive, and retainclickvalue.
Using the globals and styles as defined below, I find that:
- 1) A click to the topMenu properly opens and keeps open a subMenu, even if the mouse leaves the menu area entirely, but:
- a) if the mouse re-enters the topMenu, the subMenu closes; and
b) if the mouse re-enters the subMenu, the subMenuItems misbehave, as described in 2b.
2) With the mouse in an open subMenu, simply hovering over an item with a subMenu opens that fly-out (rather than needing a click). Moving to an adjacent item closes the fly-out (as expected), but:
- a) clicking that subMenuItem closes all menus (I was expecting the fly-out to just stay open); or
b) leaving the menu area with the fly-out open (ie. out the opposite side of the subMenu) and then re-entering the submenu disables all hover-only menu behavior (except hilighting, which simply starts being erratic).
But wait, there's more!
3) Once we have a fly-out hanging open and others not opening on hover, it gets really crazy.
- a) Clicking on any visible menu item causes the (somewhat-)expected behavior (follow a simple item link, open an unopened fly-out, close all menus if fly-out is open). Note that opening a new fly-out does NOT close the one we already have open!
b) Hovering over a subMenuItem adjacent to the one with the open fly-out and THEN clicking on the fly-out one acts as if the last hovered-over item was clicked, NOT the one that was actually clicked.
4) Now go back to having a fly-out stuck open, and clicking a subMenuItem that opens another one. Both are now open together, but hover behavior starts working again. So now hovering over the subMenuItem with the stuck fly-out and then moving off it will close that fly-out. But (not just to complicate matters -- I'm actually seeing this), if that fly-out had fly-outs of its own, they are now orphaned, still stuck open.
Note that getting all the menus to close resets any craziness.
I'm not crazy yet, but I'm certainly getting there, after watching the wacky things these menus are doing.
And here, as promised, is the combination that causes that mess:
Code: Select all
buildAllMenus = true;
closeAllOnClick = true;
retainClickValue = true;
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=6;
_subOffsetLeft=(ie ? -8 : -3);
with(topMenuStyle=new mm_style()){
offclass="coolbuttonnormal";
onclass="coolbuttonpressed";
subimage="images/menuarrowdown.gif";
onsubimage="images/onmenuarrowdown.gif";
subimagepadding="2";
openonclick=true;
closeonclick=true;
keepalive=1;
pageclass="toppagematch";
}
with(subMenuStyle=new mm_style()){
offclass="menulist";
onclass="menuhilight";
openonclick=true;
closeonclick=true;
keepalive=1;
separatorcolor="#2D729D";
separatorsize="1";
overfilter="Fade(duration=0.2);Alpha(opacity=95);Shadow(color='#777777', Direction=135, Strength=3)";
outfilter="Fade(duration=0.2)";
subimage="images/menuarrow.gif";
subimagepadding="2";
pageclass="pagematch";
}
Removing "retainClickValue=true" (or setting it to false) produces the same behavior, except that, as expected, fly-outs will only open on click, but close if an adjacent subMenuItem is hovered over.
Eliminating openonclick from the subMenu style removes some of the quirky behavior, but it also seems to prevent closeonclick from doing anything. Removing retainClickValue as well doesn't seem to change anything.
Removing only keepalive from the subMenu style eliminates all quirks, but clicking on a subMenuItem with an open fly-out still closes all menus instead of just the fly-out.
In summary, after ridiculous amounts of testing, I've come to the conclusion that:
- A) I'd like to know if closeonclick closing all menus is a feature or a bug, and have it fixed if it's a bug.
B) retainClickValue doesn't if the mouse leaves all menu space. That needs to be fixed, if possible.
C) Mixing retainClickValue and openonclick doesn't work so well. There should be better documentation on that.
D) Gripe 1a is also bug I'd like fixed.
Thank you for reading my ramblings!