Skip to content

Commit

Permalink
Delegate a click from flow-component-renderer to the first child (#4270)
Browse files Browse the repository at this point in the history
Do it ONLY if the target is the flow-component-renderer element itself.

Fixes grid#122
  • Loading branch information
Denis authored Jun 25, 2018
1 parent 707c166 commit cab1b5d
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
]
}

ready(){
super.ready();
this.addEventListener("click", function(event){
if (this.firstChild &&
typeof this.firstChild.click === "function" &&
event.target === this ){
this.firstChild.click();
}
});
}

_asyncAttachRenderedComponentIfAble() {
this._debouncer = Polymer.Debouncer.debounce(
this._debouncer,
Expand Down

0 comments on commit cab1b5d

Please sign in to comment.