Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
bind cut and paste event for autocomplete input field: https://bugzil…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jun 3, 2015
1 parent d549c54 commit 56b2b4a
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -94,12 +94,19 @@
}

jQuery(function() {
jQuery('#' + '#{cc.attrs.id}-autocomplete__input').typing({
var inputField = jQuery('#' + '#{cc.attrs.id}-autocomplete__input');
inputField.typing({
stop: function(event, elem) {
onValueChange(elem, event, #{cc.attrs.id}RenderResult, #{cc.attrs.id}ClearResults);
},
delay: 400
});

inputField.bind('paste cut', function(event) {
setTimeout(function () {
onValueChange(inputField, event, #{cc.attrs.id}RenderResult, #{cc.attrs.id}ClearResults);
}, 400);
});
});


Expand Down

0 comments on commit 56b2b4a

Please sign in to comment.