From 1780a644811ea4f7ee21b81dfcc1be10fb15a463 Mon Sep 17 00:00:00 2001 From: Maxime Dhalluin Date: Mon, 22 Feb 2016 19:06:53 +0100 Subject: [PATCH 1/2] Add possibility to avoid show sub-element on tap --- paper-submenu.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/paper-submenu.html b/paper-submenu.html index 58fed23..a1ce6c5 100644 --- a/paper-submenu.html +++ b/paper-submenu.html @@ -74,6 +74,18 @@ is: 'paper-submenu', properties: { + + /** + * Set notToggleOnTap to true to avoid show sub-element on tap. + * + * @attribute opened + */ + notToggleOnTap: { + + type : Boolean, + value : false + }, + /** * Fired when the submenu is opened. * @@ -165,7 +177,7 @@ * A handler that is called when the trigger is tapped. */ _onTap: function(e) { - if (!this.disabled) { + if (!this.disabled && !this.notToggleOnTap) { this.toggle(); } }, From 766e1118e959e07d56ba3433a04c609b7d42601f Mon Sep 17 00:00:00 2001 From: Maxime Dhalluin Date: Mon, 9 May 2016 19:43:01 +0200 Subject: [PATCH 2/2] Correct documentation for notToggleOnTap --- paper-submenu.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-submenu.html b/paper-submenu.html index a1ce6c5..ce499c1 100644 --- a/paper-submenu.html +++ b/paper-submenu.html @@ -78,7 +78,7 @@ /** * Set notToggleOnTap to true to avoid show sub-element on tap. * - * @attribute opened + * @attribute notToggleOnTap */ notToggleOnTap: {