diff options
author | Pierre Ossman <ossman@cendio.se> | 2021-11-16 09:38:14 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2021-11-16 09:38:14 +0100 |
commit | 301714928bfd45a0f11d8cbaec8f9fe538cefe79 (patch) | |
tree | a1cc7e127fba840cfda8c9faa2b0400979675502 /core/rfb.js | |
parent | 096449da35aaac925aa3e1da515cc1585e6b54f7 (diff) | |
download | novnc-301714928bfd45a0f11d8cbaec8f9fe538cefe79.tar.gz |
Avoid scrolling on RFB object focus
Chrome scrolls the view to show as much as possible of the canvas when
we call focus(), which is likely not the desired behaviour.
This also exposes the ability to pass on future options when focusing
the RFB object manually.
Diffstat (limited to 'core/rfb.js')
-rw-r--r-- | core/rfb.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/rfb.js b/core/rfb.js index ea3bf58..084a457 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -432,8 +432,8 @@ export default class RFB extends EventTargetMixin { } } - focus() { - this._canvas.focus(); + focus(options) { + this._canvas.focus(options); } blur() { @@ -609,7 +609,7 @@ export default class RFB extends EventTargetMixin { return; } - this.focus(); + this.focus({ preventScroll: true }); } _setDesktopName(name) { |