Catch input directly, open pulldown later.
This commit is contained in:
parent
7460980545
commit
6fe045924d
1 changed files with 38 additions and 35 deletions
|
@ -113,7 +113,6 @@
|
||||||
// build buffer
|
// build buffer
|
||||||
this.$element.on('keypress', $.proxy(function (e) {
|
this.$element.on('keypress', $.proxy(function (e) {
|
||||||
console.log('BUFF', this.buffer, e.keyCode, String.fromCharCode(e.which) )
|
console.log('BUFF', this.buffer, e.keyCode, String.fromCharCode(e.which) )
|
||||||
a = $.proxy(function() {
|
|
||||||
|
|
||||||
// shift
|
// shift
|
||||||
if ( e.keyCode === 16 ) {
|
if ( e.keyCode === 16 ) {
|
||||||
|
@ -144,15 +143,16 @@
|
||||||
}
|
}
|
||||||
console.log('BUFF HINT', this.buffer, this.buffer.length, e.which, String.fromCharCode(e.which))
|
console.log('BUFF HINT', this.buffer, this.buffer.length, e.which, String.fromCharCode(e.which))
|
||||||
|
|
||||||
|
b = $.proxy(function() {
|
||||||
this.result( this.buffer.substr(2,this.buffer.length) )
|
this.result( this.buffer.substr(2,this.buffer.length) )
|
||||||
|
}, this)
|
||||||
|
setTimeout(b, 400);
|
||||||
|
|
||||||
if (!this.isActive()) {
|
if (!this.isActive()) {
|
||||||
this.open()
|
this.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}, this)
|
|
||||||
setTimeout(a, 400);
|
|
||||||
|
|
||||||
}, this)).on('focus', $.proxy(function (e) {
|
}, this)).on('focus', $.proxy(function (e) {
|
||||||
this.close()
|
this.close()
|
||||||
|
@ -191,7 +191,10 @@
|
||||||
if (this.ce) {
|
if (this.ce) {
|
||||||
this.ce.input('off')
|
this.ce.input('off')
|
||||||
}
|
}
|
||||||
|
b = $.proxy(function() {
|
||||||
this.$widget.addClass('open')
|
this.$widget.addClass('open')
|
||||||
|
}, this)
|
||||||
|
setTimeout(b, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
// close widget
|
// close widget
|
||||||
|
|
Loading…
Reference in a new issue