Skip to content

Commit 985d0fa

Browse files
noamrchromium-wpt-export-bot
authored andcommitted
moveBefore: keep current modal dialog when performing an atomic move.
We still update the a11y tree when we've performed that move as the inert tree is updated. Bug: 353441314 Change-Id: I369c6825394c89f2b01bd26a8f1c025cd1f98474 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5712819 Reviewed-by: Joey Arhar <[email protected]> Commit-Queue: Noam Rosenthal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1344723}
1 parent e1462ff commit 985d0fa

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<title>moveBefore should not close a modal dialog</title>
3+
<script src="/resources/testharness.js"></script>
4+
<script src="/resources/testharnessreport.js"></script>
5+
<body>
6+
<section id="old_parent">
7+
<dialog id="dialog">
8+
</dialog>
9+
</section>
10+
<section id="new_parent">
11+
</section>
12+
<script>
13+
promise_test(async t => {
14+
const dialog = document.querySelector("#dialog");
15+
dialog.showModal();
16+
document.querySelector("#new_parent").moveBefore(dialog, null);
17+
assert_equals(document.elementFromPoint(0, 0), dialog);
18+
}, "when reparenting a modal dialog, the dialog should stay modal");
19+
</script>

0 commit comments

Comments
 (0)