MCPcopy Create free account
hub / github.com/apache/cloudstack / _fixScrollbars

Method _fixScrollbars

systemvm/agent/noVNC/core/rfb.js:993–1004  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

991 }
992
993 _fixScrollbars() {
994 // This is a hack because Safari on macOS screws up the calculation
995 // for when scrollbars are needed. We get scrollbars when making the
996 // browser smaller, despite remote resize being enabled. So to fix it
997 // we temporarily toggle them off and on.
998 const orig = this._screen.style.overflow;
999 this._screen.style.overflow = 'hidden';
1000 // Force Safari to recalculate the layout by asking for
1001 // an element's dimensions
1002 this._screen.getBoundingClientRect();
1003 this._screen.style.overflow = orig;
1004 }
1005
1006 /*
1007 * Connection states:

Callers 2

_updateClipMethod · 0.95
_updateScaleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected