So I'm working on changing the way that xul popup events get sent
around. Right now, a popupshowing event gets sent synchronously using
nsPresShell::HandleDOMEventWithTarget, and then when the event is
finished, and not prevented, the popup is opened.
My understanding is that asynchronous events are preferred. For
instance, the menu/menubar frame code needs to open/close a popup in
To do this, I'm thinking that the popup could be opened in the default
handling code for the popupshowing event. It would then initialize the
popup, cause a layout, which would open the popup. All this needs to
happen when the mouse is still pressed. Note that new frames will likely
need to created as a result of the popupshowing event.
But I'm not sure where the default handling for events is supposed to go.