Issue #2362 - Fix click handling according to the spec.

This removes some hackery surrounding preventing content clicks, and in
general handles auxclick as it should, firing that event on secondary
buttons (wheel/right on default setup for right-handed mouse).
This commit is contained in:
Moonchild 2023-11-30 18:56:26 +01:00 committed by roytam1
commit dc253ce953
8 changed files with 82 additions and 85 deletions

View file

@ -3544,7 +3544,10 @@ nsGlobalWindow::GetEventTargetParent(EventChainPreVisitor& aVisitor)
EventMessage msg = aVisitor.mEvent->mMessage;
aVisitor.mCanHandle = true;
aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
// Middle/right click shouldn't dispatch click event, use auxclick to instead.
if (mDoc->IsXULDocument()) {
aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
}
if (msg == eResize && aVisitor.mEvent->IsTrusted()) {
// QIing to window so that we can keep the old behavior also in case
// a child window is handling resize.