Set composed: true on all bubbled events
In Polymer 2, and when using native shadow DOM, events that do not have `composed: true` set do not cross shadow DOM boundaries. I cross checked and all these events seem to be handled outside of the component that fires them, so they need this. Change-Id: Iee8d2d545f3b1ea0bfb624648637fd190b952feb
This commit is contained in:
@@ -137,17 +137,19 @@
|
||||
_handleValueChange() {
|
||||
this.permission.value.modified = true;
|
||||
// Allows overall access page to know a change has been made.
|
||||
this.dispatchEvent(new CustomEvent('access-modified', {bubbles: true}));
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('access-modified', {bubbles: true, composed: true}));
|
||||
},
|
||||
|
||||
_handleRemovePermission() {
|
||||
if (this.permission.value.added) {
|
||||
this.dispatchEvent(new CustomEvent('added-permission-removed',
|
||||
{bubbles: true}));
|
||||
this.dispatchEvent(new CustomEvent(
|
||||
'added-permission-removed', {bubbles: true, composed: true}));
|
||||
}
|
||||
this._deleted = true;
|
||||
this.permission.value.deleted = true;
|
||||
this.dispatchEvent(new CustomEvent('access-modified', {bubbles: true}));
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('access-modified', {bubbles: true, composed: true}));
|
||||
},
|
||||
|
||||
_handleRulesChanged(changeRecord) {
|
||||
@@ -273,7 +275,8 @@
|
||||
const value = this._rules[this._rules.length - 1].value;
|
||||
value.added = true;
|
||||
this.set(['permission', 'value', 'rules', groupId], value);
|
||||
this.dispatchEvent(new CustomEvent('access-modified', {bubbles: true}));
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('access-modified', {bubbles: true, composed: true}));
|
||||
},
|
||||
|
||||
_computeHasRange(name) {
|
||||
|
||||
Reference in New Issue
Block a user