Open Bug 533533 Opened 12 years ago Updated 12 years ago

Improved mousethrough/allowevents


(Toolkit :: XUL Widgets, defect)

Not set




(Reporter: enndeakin, Unassigned)


The allowevents attribute is used by several elements. However, the meaning and usage is a bit different for different elements. On listitem it enables mouse events on children of the listitem, but on menus, it should be specified on the children to override the parent menu's normal handling of mouse events.

It would be good to adjust this so that allowevents was handled more consistently, work with the related mousethrough attribute, and allow more general usefulness.

One idea:

 - mouse events are targetted at the element and children
 - mouse events are always targetted at the element and never to children
 - mouse events are always targetted at the element, but a direct child
   may override this with allowevents="true|self|selfoverride"
allowevents="false|default" or unspecified
 - default behaviour
 - mouse events do not target this element at all, and fall through to lower elements

The default behaviour of most elements is to target the events as
normal, however any parent with allowevents="self" or
allowevents="selfoverride" will adjust the behaviour.

<listitem>, <treecol> and <titlebar> default to allowevents="self"
<menu> and menu-inheriting elements default to allowevents="selfoverride". All other elements default to allowevents="default".
You need to log in before you can comment on or make changes to this bug.