From 64f0950ff103a80c4326670808452d78dc40a5fe Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Wed, 17 Nov 2021 17:33:38 -0800 Subject: [PATCH] [inert] Add WPTs for interaction of inert attribute with modal dialog https://html.spec.whatwg.org/multipage/interaction.html#inert is clear: > While document is so blocked [by a modal dialog], every node that is > connected to document, with the exception of the subject element and > its shadow-including descendants, must be marked inert. (The elements > excepted by this paragraph can additionally be marked inert through > other means; being part of a modal dialog does not "protect" a node > from being marked inert.) However, both Firefox and WebKit ignore this, and let modal dialogs escape the inertness set by an ancestor with the 'inert' attribute. There is also an interesting case: when the modal dialog is the root element. Firefox handles this fine, but Chromium used to fail the test, and WebKit directly crashes. Bug: 692360 Change-Id: Ie52201a1f31790392180c96a9e08be1b5eee86d8 --- ...inert-with-modal-dialog-001.tentative.html | 55 ++++++++++++++++ ...inert-with-modal-dialog-002.tentative.html | 63 +++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 inert/inert-with-modal-dialog-001.tentative.html create mode 100644 inert/inert-with-modal-dialog-002.tentative.html diff --git a/inert/inert-with-modal-dialog-001.tentative.html b/inert/inert-with-modal-dialog-001.tentative.html new file mode 100644 index 00000000000000..a81ebeb7b659ef --- /dev/null +++ b/inert/inert-with-modal-dialog-001.tentative.html @@ -0,0 +1,55 @@ + + +Interaction of 'inert' attribute with modal dialog + + + +
+ + + diff --git a/inert/inert-with-modal-dialog-002.tentative.html b/inert/inert-with-modal-dialog-002.tentative.html new file mode 100644 index 00000000000000..dea2f46a4c8b4e --- /dev/null +++ b/inert/inert-with-modal-dialog-002.tentative.html @@ -0,0 +1,63 @@ + + +Interaction of 'inert' attribute with modal dialog, when the dialog is the root element + + + +
+ + +