Revert part of r55067 - still need that for clicks on suggestions

This commit is contained in:
Nathan Gray 2016-02-18 16:42:09 +00:00
parent 782c54976b
commit 040d1e8353

View File

@ -215,6 +215,17 @@ var et2_taglist = et2_selectbox.extend(
// Bind keyup so we can start ajax search when we like // Bind keyup so we can start ajax search when we like
.on('keyup.start_search', jQuery.proxy(this._keyup, this)); .on('keyup.start_search', jQuery.proxy(this._keyup, this));
// Unbind change handler of widget's ancestor to stop it from bubbling
// taglist has its own onchange
$j(this.getDOMNode()).unbind('change.et2_inputWidget');
// This handles clicking on a suggestion from the list in an et2 friendly way
// onChange
if(this.options.onchange && typeof this.onchange === 'function')
{
this.$taglist.on("selectionchange", jQuery.proxy(this.change,this));
}
// onClick - pass more than baseWidget, so unbind it to avoid double callback // onClick - pass more than baseWidget, so unbind it to avoid double callback
if(typeof this.onclick == 'function') if(typeof this.onclick == 'function')
{ {