Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 39c1c7e0b6e200cad91a51bc9fc980174a3df429..e46cbab9413e30a2ec5a4e428dcf01336c02b1f7 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -798,7 +798,7 @@ bool Node::shouldHaveFocusAppearance() const |
bool Node::isInert() const |
{ |
const HTMLDialogElement* dialog = document().activeModalDialog(); |
- if (dialog && !containsIncludingShadowDOM(dialog) && !dialog->containsIncludingShadowDOM(this)) |
+ if (dialog && this != document() && !dialog->containsIncludingShadowDOM(this)) |
return true; |
return document().ownerElement() && document().ownerElement()->isInert(); |
} |