Issue #2030 - Dispatch click on common interactive ancestor if mousdown/up are not on the same element

For example, if the mouse is dragged from one element to another while
staying inside the same button, dispatch from their common ancestor
This commit is contained in:
Martok 2022-11-27 16:35:56 +01:00 • committed by roytam1
commit b4dd106262
6 changed files with 103 additions and 56 deletions

View file

@ -275,6 +275,10 @@ public:
return result;
}
// If during mouseup handling we detect that click event might need to be
// dispatched, this is setup to be the target of the click event.
nsCOMPtr<dom::EventTarget> mClickTarget;
// mReason indicates the reason why the event is fired:
// - Representing mouse operation.
// - Synthesized for emulating mousemove event when the content under the