Archived
2
0

mouse onBlur reset keyboard

This commit is contained in:
m1k1o 2020-06-21 14:58:52 +02:00
parent d6dfefc9f2
commit 02d0a61cab

View File

@ -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
}