From 39f28c06ed2ae3b3b229956c98b80c2a41729ea5 Mon Sep 17 00:00:00 2001 From: Kakhaber Date: Mon, 12 Nov 2018 20:55:04 +0400 Subject: [PATCH] Is node shadow root check improved --- src/core/core.helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.helpers.js b/src/core/core.helpers.js index 5cd1d8f6e91..81d80b64fa8 100644 --- a/src/core/core.helpers.js +++ b/src/core/core.helpers.js @@ -486,7 +486,7 @@ module.exports = function() { */ helpers._getParentNode = function(domNode) { var parent = domNode.parentNode; - if (parent && parent.host) { + if (parent && Object.prototype.toString.call(parent) === '[object ShadowRoot]') { parent = parent.host; } return parent;