LibWeb: Prevent select.click() opening the dropdown

No other browser allows opening the select element dropdown with the
select.click() function.
This change stops this happening in Ladybird.
This commit is contained in:
Luke Warlow 2024-06-13 18:36:18 +02:00 committed by Andreas Kling
commit 564e546ff0
Notes: sideshowbarker 2024-07-16 23:13:25 +09:00

View file

@ -431,8 +431,9 @@ WebIDL::ExceptionOr<void> HTMLSelectElement::show_picker()
return {};
}
void HTMLSelectElement::activation_behavior(DOM::Event const&)
void HTMLSelectElement::activation_behavior(DOM::Event const& event)
{
if (event.is_trusted())
show_the_picker_if_applicable();
}