ladybird/Tests/LibWeb/Text/input/focus-shouldIndicateFocus.html
Jelle Raaijmakers 7078769ba3 LibWeb: Don't indicate focus for all form associated elements
This was a misinterpretation of the spec; we should only indicate focus
if the form associated element supports keyboard input, for which
FormAssociatedTextControlElement is a much better match.
2025-08-13 09:44:38 -04:00

17 lines
527 B
HTML

<!DOCTYPE html>
<input value="foo"><br>
<button>bar</button>
<script src="include.js"></script>
<script>
test(() => {
const reportOutline = e => { println(`${e.target.tagName}: ${window.getComputedStyle(e.target).outline}`); }
const runOutlineTest = (selector) => {
const elm = document.querySelector(selector);
elm.addEventListener('focus', reportOutline);
internals.click(elm.offsetLeft + 5, elm.offsetTop + 5);
};
runOutlineTest('input');
runOutlineTest('button');
});
</script>