mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: retarget dblclick from input UA shadow DOM to host (#41319)
dblclick on text inputs was being dispatched to an internal element used for the input, not to the <input> itself. As a result, page scripts listening for dblclick on the input never received the event. Testing: tested manually. Fixes: #41303 --------- Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
@@ -684,6 +684,9 @@ impl DocumentEventHandler {
|
||||
// > The click event type MUST be dispatched on the topmost event target indicated by the
|
||||
// > pointer, when the user presses down and releases the primary pointer button.
|
||||
|
||||
// For nodes inside a text input UA shadow DOM, dispatch dblclick at the shadow host.
|
||||
let delegated = element.find_focusable_shadow_host_if_necessary();
|
||||
let element = delegated.as_deref().unwrap_or(element);
|
||||
self.most_recently_clicked_element.set(Some(element));
|
||||
|
||||
element.set_click_in_progress(true);
|
||||
|
||||
Reference in New Issue
Block a user