mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
LibWeb: Don't attempt to set selection if control has no selectable text
This commit is contained in:
committed by
Jelle Raaijmakers
parent
8d6f36f8d6
commit
2c8fb49578
@@ -2365,6 +2365,9 @@ HTMLInputElement::ValueAttributeMode HTMLInputElement::value_attribute_mode() co
|
||||
|
||||
void HTMLInputElement::selection_was_changed(size_t selection_start, size_t selection_end)
|
||||
{
|
||||
if (!m_text_node)
|
||||
return;
|
||||
|
||||
document().set_cursor_position(DOM::Position::create(realm(), *m_text_node, selection_end));
|
||||
|
||||
if (auto selection = document().get_selection())
|
||||
|
||||
Reference in New Issue
Block a user