mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
LibWeb: Remove range-count filter from selection change handlers
The implementation of setBaseAndExtent will create a new range.
This commit is contained in:
parent
fd289deb44
commit
96ad310643
Notes:
github-actions[bot]
2024-08-31 13:52:19 +00:00
Author: https://github.com/trflynn89
Commit: 96ad310643
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1205
2 changed files with 4 additions and 10 deletions
|
@ -2366,11 +2366,8 @@ void HTMLInputElement::selection_was_changed(size_t selection_start, size_t sele
|
|||
{
|
||||
document().set_cursor_position(DOM::Position::create(realm(), *m_text_node, selection_end));
|
||||
|
||||
auto selection = document().get_selection();
|
||||
if (!selection || selection->range_count() == 0)
|
||||
return;
|
||||
|
||||
MUST(selection->set_base_and_extent(*m_text_node, selection_start, *m_text_node, selection_end));
|
||||
if (auto selection = document().get_selection())
|
||||
MUST(selection->set_base_and_extent(*m_text_node, selection_start, *m_text_node, selection_end));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue