1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:47:34 +00:00

LibWeb: Make keyboard events properly fire into a focused iframe

Google Docs focuses a "text event target" iframe using Window.focus on
the iframe's contentWindow. Doing so makes the iframe's document the
focused element we have to fire text events at. However, in the top
level browsing context, the focused element is still the iframe, so we
have to repeat the keyboard event steps but with the iframe's nested
browsing context instead.
This commit is contained in:
Luke Wilde 2022-11-05 15:36:03 +00:00 committed by Andreas Kling
parent 009f04fa46
commit e4688fedd5
2 changed files with 30 additions and 22 deletions

View file

@ -39,6 +39,8 @@ private:
bool focus_next_element();
bool focus_previous_element();
bool fire_keyboard_event(FlyString const& event_name, HTML::BrowsingContext& browsing_context, KeyCode key, unsigned modifiers, u32 code_point);
Layout::InitialContainingBlock* layout_root();
Layout::InitialContainingBlock const* layout_root() const;