Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 2c1dc4c1baf841dd990e8fe7c0838f2d70b72a92..5e1deff6b7f1d6b202f20602df3b04450f146514 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -792,7 +792,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(); |
} |