feat: support for entering text indirectly (#577)

* feat: support for entering text indirectly

* fix: restore text area value after composition input

* update guacamole keyboard.

---------

Co-authored-by: fezhang <fezhang@tencent.com>
Co-authored-by: Miroslav Šedivý <sedivy.miro@gmail.com>
This commit is contained in:
netcon
2025-09-12 14:47:34 +08:00
committed by GitHub
parent 5b9225f401
commit b194e91b1a
2 changed files with 88 additions and 7 deletions
+11
View File
@@ -26,6 +26,8 @@
@touchmove.stop.prevent="onTouchHandler"
@touchstart.stop.prevent="onTouchHandler"
@touchend.stop.prevent="onTouchHandler"
@compositionstart="onCompositionStartHandler"
@compositionend="onCompositionEndHandler"
/>
<div v-if="!playing && playable" class="player-overlay" @click.stop.prevent="playAndUnmute">
<i class="fas fa-play-circle" />
@@ -250,6 +252,7 @@
private focused = false
private fullscreen = false
private mutedOverlay = true
private lastTextAreaValue = ''
get admin() {
return this.$accessor.user.admin
@@ -756,6 +759,14 @@
first.target.dispatchEvent(simulatedEvent)
}
onCompositionStartHandler() {
this.lastTextAreaValue = this._overlay.value
}
onCompositionEndHandler() {
this._overlay.value = this.lastTextAreaValue
}
isMouseDown = false
onMouseDown(e: MouseEvent) {