diff --git a/lib/legacy/polymer.dom.js b/lib/legacy/polymer.dom.js index 478bbc9665..ff4fac8820 100644 --- a/lib/legacy/polymer.dom.js +++ b/lib/legacy/polymer.dom.js @@ -408,9 +408,20 @@ if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noP Object.defineProperties(EventApi.prototype, { + // Returns the "lowest" node in the same root as the event's currentTarget. + // When in `noPatch` mode, this must be calculated by walking the event's + // path. localTarget: { get() { - return this.event.currentTarget; + const current = this.event.currentTarget; + const currentRoot = current && dom(current).getOwnerRoot(); + const p$ = this.path; + for (let i = 0; i < p$.length; i++) { + const e = p$[i]; + if (dom(e).getOwnerRoot() === currentRoot) { + return e; + } + } }, configurable: true }, diff --git a/test/unit/polymer-dom-nopatch.html b/test/unit/polymer-dom-nopatch.html index 066c7463aa..96faf2dfd1 100644 --- a/test/unit/polymer-dom-nopatch.html +++ b/test/unit/polymer-dom-nopatch.html @@ -47,7 +47,9 @@