From 243313da2faedc6c8cb8fd91d81475d8ae66d0ae Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 10 Jan 2019 01:03:23 +0100 Subject: [PATCH 1/4] fix #114 scrolling issue on presicion touchpads, bounce scroll & pinch zoom --- FluentTerminal.Client/src/index.html | 1 + FluentTerminal.Client/src/style.css | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/FluentTerminal.Client/src/index.html b/FluentTerminal.Client/src/index.html index 7e7895ab..265890cf 100644 --- a/FluentTerminal.Client/src/index.html +++ b/FluentTerminal.Client/src/index.html @@ -5,6 +5,7 @@ + diff --git a/FluentTerminal.Client/src/style.css b/FluentTerminal.Client/src/style.css index bef21dbe..a5803da6 100644 --- a/FluentTerminal.Client/src/style.css +++ b/FluentTerminal.Client/src/style.css @@ -1,15 +1,24 @@ * { margin: 0; + -ms-overflow-style: -ms-autohiding-scrollbar; } html, body { background: transparent; height: 100%; - } + width: 100%; + overflow: hidden; + -ms-content-zooming: none; +} #terminal-container { width: 100%; height: 100%; + /* reenable scrolling only in the exterm */ + overflow-y: auto; + overflow-x: hidden; + touch-action: pan-y; + -ms-touch-action: pan-y; } .xterm .xterm-viewport { From e48815efb7796fb5492a7cdf02105db6c34ee90f Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 10 Jan 2019 15:14:24 +0100 Subject: [PATCH 2/4] rephrased comment --- FluentTerminal.Client/src/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FluentTerminal.Client/src/style.css b/FluentTerminal.Client/src/style.css index a5803da6..bb8c71c7 100644 --- a/FluentTerminal.Client/src/style.css +++ b/FluentTerminal.Client/src/style.css @@ -14,7 +14,7 @@ html, body { #terminal-container { width: 100%; height: 100%; - /* reenable scrolling only in the exterm */ + /* re-enable scrolling only in the xterm container */ overflow-y: auto; overflow-x: hidden; touch-action: pan-y; From 6ac434758a5d2c8bced372c771c25cf29e4ea330 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 12 Jan 2019 13:29:22 +0100 Subject: [PATCH 3/4] removed css that enforced autohiding --- FluentTerminal.Client/src/style.css | 1 - 1 file changed, 1 deletion(-) diff --git a/FluentTerminal.Client/src/style.css b/FluentTerminal.Client/src/style.css index bb8c71c7..0bf1fa4b 100644 --- a/FluentTerminal.Client/src/style.css +++ b/FluentTerminal.Client/src/style.css @@ -1,6 +1,5 @@ * { margin: 0; - -ms-overflow-style: -ms-autohiding-scrollbar; } html, body { From f5c9da543711c4bd402b9aaa9d41f1ec4ed9f457 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 12 Jan 2019 13:33:27 +0100 Subject: [PATCH 4/4] simplified js code handling scrollbar size --- FluentTerminal.Client/src/index.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/FluentTerminal.Client/src/index.js b/FluentTerminal.Client/src/index.js index 6a0c3e7a..1796233e 100644 --- a/FluentTerminal.Client/src/index.js +++ b/FluentTerminal.Client/src/index.js @@ -145,14 +145,11 @@ function changeOptions(options) { } function setScrollBarStyle(scrollBarStyle) { - if (scrollBarStyle == 'hidden') { - document.getElementById('terminal-container').style['-ms-overflow-style'] = 'none'; - } else if (scrollBarStyle == 'autoHiding') { - document.getElementById('terminal-container').style['-ms-overflow-style'] = '-ms-autohiding-scrollbar'; - } else if (scrollBarStyle == 'visible') { - document.getElementById('terminal-container').style['-ms-overflow-style'] = 'scrollbar'; + switch (scrollBarStyle) { + case 'hidden': return terminalContainer.style['-ms-overflow-style'] = 'none'; + case 'autoHiding': return terminalContainer.style['-ms-overflow-style'] = '-ms-autohiding-scrollbar'; + case 'visible': return terminalContainer.style['-ms-overflow-style'] = 'scrollbar'; } - } function setPadding(padding) {