mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
Also hides decendant popovers when hiding. Also hides unrelated popovers when showing dialogs.
39 lines
1 KiB
HTML
39 lines
1 KiB
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
|
|
<!-- hint popovers only hide other hint popovers -->
|
|
|
|
<div popover id=auto></div>
|
|
<div popover=hint id=hint1></div>
|
|
<div popover=hint id=hint2></div>
|
|
|
|
<script>
|
|
test(() => {
|
|
const auto = document.getElementById("auto");
|
|
const hint1 = document.getElementById("hint1");
|
|
const hint2 = document.getElementById("hint2");
|
|
|
|
auto.showPopover();
|
|
hint1.showPopover();
|
|
|
|
if (auto.matches(":popover-open")
|
|
&& hint1.matches(":popover-open")
|
|
&& !hint2.matches(":popover-open"))
|
|
println("PASS");
|
|
|
|
hint2.showPopover();
|
|
|
|
if (auto.matches(":popover-open")
|
|
&& !hint1.matches(":popover-open")
|
|
&& hint2.matches(":popover-open"))
|
|
println("PASS");
|
|
|
|
auto.hidePopover();
|
|
auto.showPopover();
|
|
|
|
if (auto.matches(":popover-open")
|
|
&& !hint1.matches(":popover-open")
|
|
&& !hint2.matches(":popover-open"))
|
|
println("PASS");
|
|
});
|
|
</script>
|