mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
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.
17 lines
527 B
HTML
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>
|