diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index 03c8943fe7..248653f664 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -353,7 +353,7 @@ function handleNotification(event, inst, fromProp, toPath, negate) { toPath = translate(fromProp, toPath, fromPath); value = detail && detail.value; } else { - value = event.target[fromProp]; + value = event.currentTarget[fromProp]; } value = negate ? !value : value; if (!inst[TYPES.READ_ONLY] || !inst[TYPES.READ_ONLY][toPath]) { diff --git a/test/unit/property-effects.html b/test/unit/property-effects.html index ca6ff7daef..fbafbed8a9 100644 --- a/test/unit/property-effects.html +++ b/test/unit/property-effects.html @@ -341,6 +341,16 @@ assert.equal(el.customEventObject.value, 84, 'custom bound path incorrect'); assert.equal(el.observerCounts.customEventObjectValueChanged, 1, 'custom bound path observer not called'); }); + + test('custom notification bubbling event to property', function() { + const child = document.createElement('div'); + el.$.boundChild.appendChild(child); + + el.$.boundChild.customEventValue = 42; + child.dispatchEvent(new Event('custom', {bubbles: true})); + assert.equal(el.customEventValue, 42, 'custom bound property incorrect'); + assert.equal(el.observerCounts.customEventValueChanged, 1, 'custom bound property observer not called'); + }); test('computed property with negative number', function() { assert.equal(el.$.boundChild.computedNegativeNumber, -1);