summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2021-12-13 10:03:28 +0100
committerSamuel Mannehed <samuel@cendio.se>2021-12-13 10:07:16 +0100
commita78a7bf8aa0d8d321a8d17fe547c0b01f28197bf (patch)
treeb963a9a2b4d5172ca5dffc6ee1bb8e5259d62935 /core
parent78eda3c0403f82e10a6fe1bcc5f473a9af571474 (diff)
downloadnovnc-a78a7bf8aa0d8d321a8d17fe547c0b01f28197bf.tar.gz
Update comment for scrollbar workaround
This is no longer an issue on Google Chrome, tested on Chrome 96 on Fedora 34, Windows 10, macOS 12 and Android 12. It is however an issue on Safari on macOS 12. Without this workaround we get scrollbars when making the browser window smaller, despite remote resize being enabled.
Diffstat (limited to 'core')
-rw-r--r--core/rfb.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/rfb.js b/core/rfb.js
index 1583103..fe9939f 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -703,12 +703,13 @@ export default class RFB extends EventTargetMixin {
}
_fixScrollbars() {
- // This is a hack because Chrome screws up the calculation
- // for when scrollbars are needed. So to fix it we temporarily
- // toggle them off and on.
+ // This is a hack because Safari on macOS screws up the calculation
+ // for when scrollbars are needed. We get scrollbars when making the
+ // browser smaller, despite remote resize being enabled. So to fix it
+ // we temporarily toggle them off and on.
const orig = this._screen.style.overflow;
this._screen.style.overflow = 'hidden';
- // Force Chrome to recalculate the layout by asking for
+ // Force Safari to recalculate the layout by asking for
// an element's dimensions
this._screen.getBoundingClientRect();
this._screen.style.overflow = orig;