From 02d0a61cabbd76c1efc3f1dbdf2593097b8a02fa Mon Sep 17 00:00:00 2001 From: m1k1o Date: Sun, 21 Jun 2020 14:58:52 +0200 Subject: [PATCH] mouse onBlur reset keyboard --- client/src/components/video.vue | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/client/src/components/video.vue b/client/src/components/video.vue index b6350646..d0fd019c 100644 --- a/client/src/components/video.vue +++ b/client/src/components/video.vue @@ -352,7 +352,6 @@ }) document.addEventListener('focusin', this.onFocus.bind(this)) - document.addEventListener('focusout', this.onBlur.bind(this)) /* Initialize Guacamole Keyboard */ this.keyboard.onkeydown = (key: number) => { @@ -377,7 +376,6 @@ this.observer.disconnect() this.$accessor.video.setPlayable(false) document.removeEventListener('focusin', this.onFocus.bind(this)) - document.removeEventListener('focusout', this.onBlur.bind(this)) /* Guacamole Keyboard does not provide destroy functions */ } @@ -441,14 +439,6 @@ } } - onBlur() { - if (!this.focused || !this.hosting || this.locked) { - return - } - - this.keyboard.reset() - } - onMousePos(e: MouseEvent) { const { w, h } = this.$accessor.video.resolution const rect = this._overlay.getBoundingClientRect() @@ -525,6 +515,7 @@ }) } + this.keyboard.reset() this.focused = false }