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 7d5c5e6 commit 5649b4f
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 5649b4f

Please sign in to comment.