mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Avoid binding click handler multiple times
This commit is contained in:
parent
4a69b8ddf4
commit
772d6605a0
@ -277,7 +277,6 @@ 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,7 +284,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
|
||||
this.clicked = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
this.clicked = false;
|
||||
return true;
|
||||
},
|
||||
|
||||
@ -299,7 +298,7 @@ var et2_dropdown_button = (function(){ "use strict"; return et2_inputWidget.exte
|
||||
|
||||
// Move the parent's handler to the button, or we can't tell the difference between the clicks
|
||||
jQuery(this.node).unbind("click.et2_baseWidget");
|
||||
this.button.bind("click.et2_baseWidget", this, function(e) {
|
||||
this.button.off().bind("click.et2_baseWidget", this, function(e) {
|
||||
return e.data.click.call(e.data, this);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user