Index: third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js |
index 9e273fba34d427b4b7ed0423d7739834c2173f17..0a3c79b9eb35dc9a79ef796d78b684b37a472a7f 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js |
+++ b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js |
@@ -932,7 +932,7 @@ Event.prototype.deepElementFromPoint = function() |
Event.prototype.deepActiveElement = function() |
{ |
var activeElement = this.target && this.target.ownerDocument ? this.target.ownerDocument.activeElement : null; |
- while (activeElement && activeElement.shadowRoot) |
+ while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) |
activeElement = activeElement.shadowRoot.activeElement; |
return activeElement; |
} |