fix key events for textareas.
This commit is contained in:
parent
520dc08100
commit
b42308c7cc
|
@ -5122,8 +5122,12 @@ Textarea.prototype.readInput = function(callback) {
|
|||
: callback(null, value);
|
||||
};
|
||||
|
||||
this.__listener = this._listener.bind(this);
|
||||
this.on('keypress', this.__listener);
|
||||
// Put this in a nextTick so the current
|
||||
// key event doesn't trigger any keys input.
|
||||
nextTick(function() {
|
||||
self.__listener = self._listener.bind(self);
|
||||
self.on('keypress', self.__listener);
|
||||
});
|
||||
|
||||
this.__done = this._done.bind(this, null, null);
|
||||
this.on('blur', this.__done);
|
||||
|
|
Loading…
Reference in New Issue