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 and gilberto-torrezan committed Jul 11, 2018
1 parent d4dcf92 commit 7119836
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 7119836

Please sign in to comment.