Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
focused_element_id = null;
function OnFocus(event) {
focused_element_id = event.target.id;
}
</script>
<selectlist id="selectlist" onfocus="OnFocus(event)" disabled>
<option>one</option>
<option>two</option>
<option>three</option>
</selectlist>
<script>
promise_test(async () => {
const selectlist = document.getElementById("selectlist");
selectlist.focus();
assert_equals(focused_element_id, null);
}, "Check that disabled <selectlist> cannot be focused");
</script>