mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-10 01:59:43 +00:00
LibWeb/HTML: Select html input elements with selectable text
only select input elements that select applies to and has a selectable text.
This commit is contained in:
parent
d77843e2f0
commit
6fe43e9f73
Notes:
github-actions[bot]
2024-09-22 04:44:47 +00:00
Author: https://github.com/mobounya
Commit: 6fe43e9f73
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1478
3 changed files with 25 additions and 2 deletions
|
@ -232,8 +232,7 @@ WebIDL::ExceptionOr<void> FormAssociatedTextControlElement::select()
|
|||
auto& html_element = form_associated_element_to_html_element();
|
||||
if (is<HTMLInputElement>(html_element)) {
|
||||
auto& input_element = static_cast<HTMLInputElement&>(html_element);
|
||||
// FIXME: implement "or the corresponding control has no selectable text"
|
||||
if (!input_element.select_applies())
|
||||
if (!input_element.select_applies() || !input_element.has_selectable_text())
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue