mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
774822105f
13 changed files with 109 additions and 110 deletions
|
|
@ -189,6 +189,9 @@ EditorEventListener::InstallToEditor()
|
|||
elmP->AddEventListenerByType(this,
|
||||
NS_LITERAL_STRING("click"),
|
||||
TrustedEventsAtCapture());
|
||||
elmP->AddEventListenerByType(this,
|
||||
NS_LITERAL_STRING("auxclick"),
|
||||
TrustedEventsAtSystemGroupCapture());
|
||||
// Focus event doesn't bubble so adding the listener to capturing phase.
|
||||
// Make sure this works after bug 235441 gets fixed.
|
||||
elmP->AddEventListenerByType(this,
|
||||
|
|
@ -282,6 +285,9 @@ EditorEventListener::UninstallFromEditor()
|
|||
elmP->RemoveEventListenerByType(this,
|
||||
NS_LITERAL_STRING("click"),
|
||||
TrustedEventsAtCapture());
|
||||
elmP->RemoveEventListenerByType(this,
|
||||
NS_LITERAL_STRING("auxclick"),
|
||||
TrustedEventsAtSystemGroupCapture());
|
||||
elmP->RemoveEventListenerByType(this,
|
||||
NS_LITERAL_STRING("blur"),
|
||||
TrustedEventsAtCapture());
|
||||
|
|
@ -447,6 +453,15 @@ EditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
|
|||
}
|
||||
// click
|
||||
case eMouseClick: {
|
||||
WidgetMouseEvent* widgetMouseEvent = internalEvent->AsMouseEvent();
|
||||
// Don't handle non-primary click events
|
||||
if (widgetMouseEvent->button != WidgetMouseEvent::eLeftButton) {
|
||||
return NS_OK;
|
||||
}
|
||||
[[fallthrough]];
|
||||
}
|
||||
// auxclick
|
||||
case eMouseAuxClick: {
|
||||
nsCOMPtr<nsIDOMMouseEvent> mouseEvent = do_QueryInterface(aEvent);
|
||||
NS_ENSURE_TRUE(mouseEvent, NS_OK);
|
||||
// If the preceding mousedown event or mouseup event was consumed,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue