blob: f557804d9bf3d81daa2132d604d1085e65e6fca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<!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>
|