Avoid double-binding change & focus handlers

This commit is contained in:
Nathan Gray 2013-11-13 18:17:50 +00:00
parent cbeeb85251
commit b7487f8b72

View File

@ -106,12 +106,14 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener],
var node = this.getInputNode(); var node = this.getInputNode();
if (node) if (node)
{ {
$j(node).bind("change.et2_inputWidget", this, function(e) { $j(node)
e.data.change.call(e.data, this); .off('.et2_inputWidget')
}); .bind("change.et2_inputWidget", this, function(e) {
$j(node).bind("focus", this, function(e) { e.data.change.call(e.data, this);
e.data.focus.call(e.data, this); })
}); .bind("focus.et2_inputWidget", this, function(e) {
e.data.focus.call(e.data, this);
});
} }
this._super.apply(this,arguments); this._super.apply(this,arguments);