From e1b4378d1c13b0287efb7f9b4f4a19cfe17ef211 Mon Sep 17 00:00:00 2001 From: Pradip Vadasak Date: Tue, 4 Jul 2017 19:11:02 +0530 Subject: [PATCH] In shadowDOM, trigger resize event manually if event is coming from descendent LightDOM. --- iron-resizable-behavior.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/iron-resizable-behavior.html b/iron-resizable-behavior.html index c689363..9e49060 100644 --- a/iron-resizable-behavior.html +++ b/iron-resizable-behavior.html @@ -153,12 +153,13 @@ return; } - // NOTE(cdata): In ShadowDOM, event retargeting makes echoing of the - // otherwise non-bubbling event "just work." We do it manually here for - // the case where Polymer is not using shadow roots for whatever reason: - if (!Polymer.Settings.useShadow) { - this._fireResize(); + // NOTE(cdata): "Don't need to trigger event manually in case of ShadowDOM is used and + // event is coming from local DOM because of event retargeting. Otherwise, we need to trigger it manually". + if (Polymer.Settings.useShadow && event.target.domHost === this) { + return; } + + this._fireResize(); }, _fireResize: function() {