diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /dom/events/test/test_focus_abspos.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/events/test/test_focus_abspos.html')
-rw-r--r-- | dom/events/test/test_focus_abspos.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dom/events/test/test_focus_abspos.html b/dom/events/test/test_focus_abspos.html new file mode 100644 index 0000000000..8798c4ed11 --- /dev/null +++ b/dom/events/test/test_focus_abspos.html @@ -0,0 +1,32 @@ +<!doctype html> +<title>Test for bug 1424633: clicking on an oof descendant focus its focusable ancestor</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/tests/SimpleTest/EventUtils.js"></script> +<style> + #focusable { + width: 100px; + height: 100px; + background-color: blue; + } + #oof { + background-color: green; + position: absolute; + top: 25px; + } +</style> +<div tabindex="0" id="focusable"> + <span id="oof">Absolute</span> +</div> +<script> +window.onload = function() { + async_test(function(t) { + document.body.offsetTop; + setTimeout(t.step_func_done(function() { + let span = document.querySelector("#oof"); + synthesizeMouseAtCenter(span, {type: "mousedown"}); + assert_equals(document.activeElement, document.querySelector("#focusable")); + }), 0); + }, "Clicking on an abspos descendant focus its focusable ancestor"); +} +</script> |