mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 08:21:50 -06:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user