PDA

View Full Version : Calculating Menu region



jitensachdeva
12 Feb 2008, 11:05 PM
Hi All,

I am trying to implement menu hide functionality on mouseout. I am using "mouseout" event to do the same. I am hiding menu by using -



//m is menu
if (!m.activeItem && !m.getEl().getRegion().contains(e.getPoint())) {
m.hide(true);
}


The problem with this code is that whenever I move the mouse slowly outside menu boundaries, the menu doesn

RWaters
23 Feb 2008, 8:06 AM
Can you remove the check to see if the region contains the point? Sounds like it might solve the issue.

jitensachdeva
23 Feb 2008, 5:53 PM
Thanks for your response


Can you remove the check to see if the region contains the point? Sounds like it might solve the issue.

If I remove the check the menu vanished even if I move mouse from one item to another. Similarly If I move mouse into the submenu the menu vanished.

The root cause which I can see is that menu region is including shadow width . I have made shadow parameter false. Seems like a small bug in getRegion function of menu.

Cheers !
Jiten