mirror of
https://github.com/servo/servo.git
synced 2025-06-26 01:54:33 +01:00
libservo: Allow embedders to signal when the cursor has left the WebView
(#37317)
Currently, the hover state will stay when the mouse moves out of the webview, this PR fixes it Testing: Hover on the `About` on servo.org, and then move the mouse up to the browser UI, see the hover state resets Signed-off-by: Tony <legendmastertony@gmail.com>
This commit is contained in:
parent
0896341285
commit
b9fcc95992
7 changed files with 125 additions and 27 deletions
|
@ -1127,6 +1127,14 @@ impl ScriptThread {
|
|||
can_gc,
|
||||
);
|
||||
},
|
||||
InputEvent::MouseLeave(_) => {
|
||||
self.topmost_mouse_over_target.take();
|
||||
document.handle_mouse_leave_event(
|
||||
event.hit_test_result,
|
||||
event.pressed_mouse_buttons,
|
||||
can_gc,
|
||||
);
|
||||
},
|
||||
InputEvent::Touch(touch_event) => {
|
||||
let touch_result =
|
||||
document.handle_touch_event(touch_event, event.hit_test_result, can_gc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue