mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-02 23:21:56 +00:00
LibWeb: Don't dispatch click events to disabled FormAssociatedElements
Disabled FormAssociatedElements also no longer receive focus when clicked.
This commit is contained in:
parent
c09b5b8df0
commit
e18501f67f
Notes:
sideshowbarker
2024-07-17 05:03:11 +09:00
Author: https://github.com/tcl3
Commit: e18501f67f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/601
4 changed files with 25 additions and 10 deletions
|
@ -778,9 +778,11 @@ void HTMLInputElement::create_button_input_shadow_tree()
|
|||
{
|
||||
auto shadow_root = heap().allocate<DOM::ShadowRoot>(realm(), document(), *this, Bindings::ShadowRootMode::Closed);
|
||||
set_shadow_root(shadow_root);
|
||||
|
||||
auto text_container = MUST(DOM::create_element(document(), HTML::TagNames::span, Namespace::HTML));
|
||||
MUST(text_container->set_attribute(HTML::AttributeNames::style, "display: inline-block; pointer-events: none;"_string));
|
||||
m_text_node = heap().allocate<DOM::Text>(realm(), document(), value());
|
||||
MUST(shadow_root->append_child(*m_text_node));
|
||||
MUST(text_container->append_child(*m_text_node));
|
||||
MUST(shadow_root->append_child(*text_container));
|
||||
}
|
||||
|
||||
void HTMLInputElement::create_text_input_shadow_tree()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue