From 8f4b943a8d697fafd932c252df574935bcb780fe Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Sat, 7 Nov 2020 05:56:00 +0300 Subject: fixed exit pointer lock --- web/share/js/kvm/mouse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/share') diff --git a/web/share/js/kvm/mouse.js b/web/share/js/kvm/mouse.js index 961750c2..4f021e5c 100644 --- a/web/share/js/kvm/mouse.js +++ b/web/share/js/kvm/mouse.js @@ -72,7 +72,7 @@ export function Mouse(record_callback) { __ws = ws; $("stream-box").classList.toggle("stream-box-mouse-enabled", ws); if (!__absolute && __isRelativeCaptured()) { - $("stream-box").exitPointerLock(); + document.exitPointerLock(); } __updateOnlineLeds(); }; @@ -83,7 +83,7 @@ export function Mouse(record_callback) { state.absolute = true; } if (!__absolute && state.absolute && __isRelativeCaptured()) { - $("stream-box").exitPointerLock(); + document.exitPointerLock(); } if (__absolute && !state.absolute) { __relative_deltas = []; -- cgit v1.2.3