From 23b43f3880a09c9794e27f0cff3625d6db841c77 Mon Sep 17 00:00:00 2001 From: Goran Prijic Date: Wed, 18 May 2016 09:22:43 +0200 Subject: [PATCH] Turn off native scroll --- assets/js/terminal.js | 6 +++++- assets/styl/terminal.styl | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/js/terminal.js b/assets/js/terminal.js index b3cde1e1..4430511f 100644 --- a/assets/js/terminal.js +++ b/assets/js/terminal.js @@ -14,7 +14,7 @@ self.wrapElement; self.process; - BaseTerminal.call(this); + BaseTerminal.call(this, {nativeScroll: false}); self._restoreOptions(options); self.open(); @@ -42,6 +42,10 @@ this.wrapElement = document.createElement('div'); this.wrapElement.className = 'window'; + if (!this.nativeScroll) { + this.wrapElement.style.overflowY = "hidden"; + } + return this._open(this.wrapElement); }; diff --git a/assets/styl/terminal.styl b/assets/styl/terminal.styl index 1e5414cd..92e7f51f 100644 --- a/assets/styl/terminal.styl +++ b/assets/styl/terminal.styl @@ -4,7 +4,7 @@ box-sizing: border-box box-shadow: none border: 2px solid color-gray-dark - overflow-y: auto !important + overflow-y: auto overflow-x: hidden !important .terminal