Introduction

This is a small update to the XMenu system that allows the menus to be shown
when the mouse pointer hovers a menu button and hides the menu when leaving it.
For this to work I had to do some small changes and while I was at it I also removed
the Opera focus bug hack because now you can get the menu to work in Opera using
the hover mode.

Usage

There are three new global variables that control how the menu works.

Name

Description

webfxMenuUseHover

If this is set to true then the menu will be set in hover mode and this means
that the menu will open on mouse over and hide on mouse out.

webfxMenuShowTime

This is the time to wait before showing a menu. Using 0 when the menu is in hover mode
is not recommended because then the menus will popup even when the user did not intend them
to.

webfxMenuHideTime

This is the time to wait before hiding a menu. When using normal mode it is important that
this time is fairly large (~300ms) because otherwise the user will not have time to complete
the click on the menu item she/he intended. When using hover mode this time should be about the
same. If too small the menus will hide when going between sub menus.

These properties should be set (if changed) before the menus are written. The hover mode is only
checked at creation.

Implementation

The main code for this was added to the webFXmenuHandler but throughout all the
toString methods we had to test the hover mode and and add the inline event listeners
accordingly. All these do is to call webfxMenuHandler.outMenuItem(this) (as well as
the same for focus, blur and mouseover).

The code in _over is exactly the same as we previously had in the
original overMenuItem. The code for _out is fairly straight
forward and all it does is to find the top most menu and if found hides it.