mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Evaluate the custom keydown event handler before scrolling down
Fixes #368
This commit is contained in:
+4
-4
@@ -2425,15 +2425,15 @@ Terminal.prototype.attachCustomKeydownHandler = function(customKeydownHandler) {
|
||||
* @param {KeyboardEvent} ev The keydown event to be handled.
|
||||
*/
|
||||
Terminal.prototype.keyDown = function(ev) {
|
||||
if (this.customKeydownHandler && this.customKeydownHandler(ev) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Scroll down to prompt, whenever the user presses a key.
|
||||
if (this.ybase !== this.ydisp) {
|
||||
this.scrollToBottom();
|
||||
}
|
||||
|
||||
if (this.customKeydownHandler && this.customKeydownHandler(ev) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.compositionHelper.keydown.bind(this.compositionHelper)(ev)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user