mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
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:
parent
73bf6f95f8
commit
dc253ce953
8 changed files with 82 additions and 85 deletions
|
|
@ -43,8 +43,6 @@
|
|||
|
||||
static NS_DEFINE_CID(kXULControllersCID, NS_XULCONTROLLERS_CID);
|
||||
|
||||
#define NS_NO_CONTENT_DISPATCH (1 << 0)
|
||||
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(TextArea)
|
||||
|
||||
namespace mozilla {
|
||||
|
|
@ -521,18 +519,6 @@ HTMLTextAreaElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
|
|||
mHandlingSelect = true;
|
||||
}
|
||||
|
||||
// If noContentDispatch is true we will not allow content to handle
|
||||
// this event. But to allow middle mouse button paste to work we must allow
|
||||
// middle clicks to go to text fields anyway.
|
||||
if (aVisitor.mEvent->mFlags.mNoContentDispatch) {
|
||||
aVisitor.mItemFlags |= NS_NO_CONTENT_DISPATCH;
|
||||
}
|
||||
if (aVisitor.mEvent->mMessage == eMouseClick &&
|
||||
aVisitor.mEvent->AsMouseEvent()->button ==
|
||||
WidgetMouseEvent::eMiddleButton) {
|
||||
aVisitor.mEvent->mFlags.mNoContentDispatch = false;
|
||||
}
|
||||
|
||||
if (aVisitor.mEvent->mMessage == eBlur) {
|
||||
// Set mWantsPreHandleEvent and fire change event in PreHandleEvent to
|
||||
// prevent it breaks event target chain creation.
|
||||
|
|
@ -596,10 +582,6 @@ HTMLTextAreaElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
|||
UpdateState(true);
|
||||
}
|
||||
|
||||
// Reset the flag for other content besides this text field
|
||||
aVisitor.mEvent->mFlags.mNoContentDispatch =
|
||||
((aVisitor.mItemFlags & NS_NO_CONTENT_DISPATCH) != 0);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue