Closed ropic closed 2 years ago
use case: sometimes user only enter one value without hit enter then blur event could be used:
self._blur = function() { self.$input.on('blur', function() { if(self.$input.val().length > 0){ e = $.Event('keyup'); e.keyCode = 13; e.which = 13; self.$input.trigger(e); } }); };
On initialization
self._blur();
maybe it's necessary to tell the users fire the event in case on submit button because blur is not fired
Hi @ropic,
Thx for the trick. Maybe you could make a pull request :)
use case: sometimes user only enter one value without hit enter then blur event could be used:
On initialization