From 4a69b8ddf46de09a294dac76711cf7d7818a4198 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 26 Sep 2017 14:49:45 +0200 Subject: [PATCH] Fix dropdown_button click handler gets called twice --- api/js/etemplate/et2_widget_dropdown_button.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/api/js/etemplate/et2_widget_dropdown_button.js b/api/js/etemplate/et2_widget_dropdown_button.js index 885bd8a585..4a4b795390 100644 --- a/api/js/etemplate/et2_widget_dropdown_button.js +++ b/api/js/etemplate/et2_widget_dropdown_button.js @@ -277,6 +277,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte * @returns {Boolean} */ click: function(_ev) { + if (this.clicked) return; this.clicked = true; if (!this._super.apply(this, arguments)) @@ -285,12 +286,6 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte return false; } - // Submit the form - if (this._type != "buttononly") - { - this.getInstanceManager().submit(this); //TODO: this only needs to be passed if it's in a datagrid - } - this.clicked = false; return true; },