From cab1b5d46b8e34e7e177d6c7db8879252eec41f7 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 25 Jun 2018 19:54:41 +0300 Subject: [PATCH] Delegate a click from flow-component-renderer to the first child (#4270) Do it ONLY if the target is the flow-component-renderer element itself. Fixes grid#122 --- .../resources/frontend/flow-component-renderer.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/flow-data/src/main/resources/META-INF/resources/frontend/flow-component-renderer.html b/flow-data/src/main/resources/META-INF/resources/frontend/flow-component-renderer.html index d7d7c22f9a9..3f940fc1a47 100644 --- a/flow-data/src/main/resources/META-INF/resources/frontend/flow-component-renderer.html +++ b/flow-data/src/main/resources/META-INF/resources/frontend/flow-component-renderer.html @@ -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,