]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/xterm.js
Prevent keyboard modifier events from scrolling down
[mirror_xterm.js.git] / src / xterm.js
index 85efc22307f621cfb5d2759cf0c6dda32aa0fc2a..5924b79650c9c16ab1051e7de607fe8cd5455f96 100644 (file)
@@ -36,6 +36,7 @@ import { EventEmitter } from './EventEmitter.js';
 import { Viewport } from './Viewport.js';
 import { rightClickHandler, pasteHandler, copyHandler } from './handlers/Clipboard.js';
 import * as Browser from './utils/Browser';
+import * as Keyboard from './utils/Keyboard';
 
 /**
  * Terminal Emulation References:
@@ -2426,7 +2427,7 @@ Terminal.prototype.attachCustomKeydownHandler = function(customKeydownHandler) {
  */
 Terminal.prototype.keyDown = function(ev) {
   // Scroll down to prompt, whenever the user presses a key.
-  if (this.ybase !== this.ydisp) {
+  if (!Keyboard.isModifierOnlyKeyboardEvent(ev) && this.ybase !== this.ydisp) {
     this.scrollToBottom();
   }