mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Recompute selection state in Document::update_layout()
Fixes a bug when text selection disappears after relayout.
This commit is contained in:
parent
d7caa426a0
commit
1a1fb14e26
Notes:
github-actions[bot]
2024-11-14 18:51:45 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/1a1fb14e26f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2344
1 changed files with 4 additions and 0 deletions
|
@ -1234,6 +1234,10 @@ void Document::update_layout()
|
|||
page().client().page_did_layout();
|
||||
}
|
||||
|
||||
if (auto range = get_selection()->range()) {
|
||||
paintable()->recompute_selection_states(*range);
|
||||
}
|
||||
|
||||
m_needs_layout = false;
|
||||
|
||||
// Scrolling by zero offset will clamp scroll offset back to valid range if it was out of bounds
|
||||
|
|
Loading…
Reference in a new issue