diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index 807972156aa..9c4c9a41798 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -4078,7 +4078,7 @@ bool Element::should_indicate_focus() const // * If the element which supports keyboard input (such as an input element, or any other element that would // triggers a virtual keyboard to be shown on focus if a physical keyboard were not present), indicate focus. - if (is(this)) + if (is(this)) return true; // * If the user interacts with the page via keyboard or some other non-pointing device, indicate focus. (This means diff --git a/Tests/LibWeb/Text/expected/focus-shouldIndicateFocus.txt b/Tests/LibWeb/Text/expected/focus-shouldIndicateFocus.txt new file mode 100644 index 00000000000..014d9b8162e --- /dev/null +++ b/Tests/LibWeb/Text/expected/focus-shouldIndicateFocus.txt @@ -0,0 +1,2 @@ +INPUT: rgb(0, 0, 0) auto 3px +BUTTON: rgb(0, 0, 0) 0px diff --git a/Tests/LibWeb/Text/input/focus-shouldIndicateFocus.html b/Tests/LibWeb/Text/input/focus-shouldIndicateFocus.html new file mode 100644 index 00000000000..850d2a9e27e --- /dev/null +++ b/Tests/LibWeb/Text/input/focus-shouldIndicateFocus.html @@ -0,0 +1,17 @@ + +
+ + +