ContextMenu & Sub Menu Delay

I started using the ContextMenu addon which I like a lot. There is one minor point though I am trying to resolve.

Basically in my application I define a context top level menu with one sub-menu. For some reason when I hover above the top level menu item which triggers the sub menu I get this 2 seconds delay which I would like to avoid if I could and just have it open straight up.

I tried tracing it through the ContextMenu class to see if there is any sort of an “enforced” delay but I could not find any or any other reason why it would behave like that?

Any suggestions?

setImmediate(true);
?

That doesn’t do it

Since I use this add-on too, I was curious.
In client/ui/VMenu.java, line 233, we have: openTimer.schedule(1000);
The comment says: // automatically open submenus after one second of hovering
but in practice, indeed, I can count around 2 s before seeing the sub-menu.
Unfortunately, it is hard-coded, so to change this, you have to recompile the add-on.

Hello Philippe,

I found the line of code you were talking about.

Exactly what I was looking for.

Thanks alot.