one for fix for clear option keypup handler
This commit is contained in:
parent
4e48b8e0c5
commit
b74e2b8b73
@ -44,8 +44,20 @@ $(function(){
|
||||
if (this.options.clear) {
|
||||
this.$clear = $('<span class="editable-clear-x"></span>');
|
||||
this.$input.after(this.$clear)
|
||||
.css('padding-right', 20)
|
||||
.keyup($.proxy(this.toggleClear, this))
|
||||
.css('padding-right', 24)
|
||||
.keyup($.proxy(function(e) {
|
||||
//arrows, enter, tab, etc
|
||||
if(~$.inArray(e.keyCode, [40,38,9,13,27])) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(this.t);
|
||||
var that = this;
|
||||
this.t = setTimeout(function() {
|
||||
that.toggleClear(e);
|
||||
}, 200);
|
||||
|
||||
}, this))
|
||||
.parent().css('position', 'relative');
|
||||
|
||||
this.$clear.click($.proxy(this.clear, this));
|
||||
@ -73,11 +85,6 @@ $(function(){
|
||||
return;
|
||||
}
|
||||
|
||||
//arrows, enter, tab, etc
|
||||
if(~$.inArray(e.keyCode, [40,38,9,13,27])) {
|
||||
return;
|
||||
}
|
||||
|
||||
var len = this.$input.val().length,
|
||||
visible = this.$clear.is(':visible');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user