Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

preserving keyup listener with new oninput event

  • Loading branch information...
commit d0b959321670db1bb4a9624332673a90fc57d581 1 parent acb2963
@joestelmach joestelmach authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/js/text_field.js
View
7 src/js/text_field.js
@@ -35,12 +35,13 @@
this.input = $.el.input({maxLength : this.options.maxLength});
- $(this.input).input(_.bind(function(e) {
- this._updateModel();
+ $(this.input).keyup(_(function(e) {
if(_(this.options.onKeyPress).exists() && _(this.options.onKeyPress).isFunction()) {
this.options.onKeyPress(e, this);
}
- }, this));
+ }).bind(this));
+
+ $(this.input).input(_(this._updateModel).bind(this));
this._observeModel(this._refreshValue);
},
Please sign in to comment.
Something went wrong with that request. Please try again.