javascript - Pasting text with the mouse doesn't trigger search -


for selectize.js ajax search inserting text mouse not cause search

it's can simle reproduced on http://brianreavis.github.io/selectize.js page. on remote source — github example:

  1. focus on field
  2. delete selected
  3. insert text text mouse (not ctrl+v)
  4. no result

how fix it?

update

for catching event jquery bind method. selectize on method can't catch (bug?).

$('.selectize').bind('input', function(){ // force selectize make ajax call , show result   });  // following code catch nothing $('.selectize')[0].selectize.on('input', function(){ // force selectize make ajax call    }); 

but can't find solution forcing selectize ajax call

you can find fix on issue page https://github.com/selectize/selectize.js/issues/882

the code

onpaste: function(e) {         var self = this;         if (self.isfull() || self.isinputhidden || self.islocked) {             e.preventdefault();         } else {             // if regex or string included, split pasted             // input , create items each separate value              settimeout(function() {                  if (self.settings.spliton) {                     var splitinput = $.trim(self.$control_input.val() || '').split(self.settings.spliton);                     (var = 0, n = splitinput.length; < n; i++) {                         self.createitem(splitinput[i]);                     }                   }                   self.onkeyup(e);             }, 0);         }     }, 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -