mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 01:42:54 +00:00
LibWebView+WebContent: Propagate unconsumed input events out of OOPWV
Since 9e2bd9d261a8c0c1b5eeafde95ca310efc667204, the OOPWV has been consuming all mouse and keyboard events, preventing action shortcuts from working. So let's fix that. :^) OOPWV now queues up input events, sending them one at a time to the WebContent process and waiting for the new `did_finish_handling_input_event(bool event_was_accepted) =|` IPC call before sending the next one. If the event was not accepted, OOPWV imitates the usual event bubbling: first passing the event to its superclass, then to its parent widget, and finally propagating to any Action shortcuts. With this, shortcuts like Ctrl+I to open Browser's JS console work again, except when a contenteditable field is selected. That's a whole separate stack of yaks. Co-authored-by: Zaggy1024 <zaggy1024@gmail.com>
This commit is contained in:
parent
2654bfead4
commit
d94d60219c
Notes:
sideshowbarker
2024-07-18 03:35:30 +09:00
Author: https://github.com/AtkinsSJ
Commit: d94d60219c
Pull-request: https://github.com/SerenityOS/serenity/pull/16128
8 changed files with 168 additions and 14 deletions
|
@ -280,4 +280,9 @@ void WebContentClient::did_request_file(String const& path, i32 request_id)
|
|||
m_view.notify_server_did_request_file({}, path, request_id);
|
||||
}
|
||||
|
||||
void WebContentClient::did_finish_handling_input_event(bool event_was_accepted)
|
||||
{
|
||||
m_view.notify_server_did_finish_handling_input_event(event_was_accepted);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue