mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
LibWeb: Make any HTMLInputElement with type != hidden focusable
From the HTML spec: Modulo platform conventions, it is suggested that the following elements should be considered as focusable areas and be sequentially focusable: ... - input elements whose type attribute are not in the Hidden state ...
This commit is contained in:
parent
4923e4d406
commit
80506a161f
Notes:
sideshowbarker
2024-07-17 16:43:00 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/80506a161f Pull-request: https://github.com/SerenityOS/serenity/pull/13279
@ -208,11 +208,6 @@ void HTMLInputElement::did_receive_focus()
|
||||
browsing_context->set_cursor_position(DOM::Position { *m_text_node, 0 });
|
||||
}
|
||||
|
||||
bool HTMLInputElement::is_focusable() const
|
||||
{
|
||||
return m_text_node;
|
||||
}
|
||||
|
||||
void HTMLInputElement::parse_attribute(FlyString const& name, String const& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
|
@ -78,8 +78,11 @@ public:
|
||||
|
||||
void did_edit_text_node(Badge<BrowsingContext>);
|
||||
|
||||
virtual bool is_focusable() const override;
|
||||
// ^EventTarget
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-input-element
|
||||
virtual bool is_focusable() const override { return m_type != TypeAttributeState::Hidden; }
|
||||
|
||||
// ^HTMLElement
|
||||
virtual void parse_attribute(FlyString const&, String const&) override;
|
||||
virtual void did_remove_attribute(FlyString const&) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user