From b6be4f09fc36c017b46e42193f7a21b5440d4c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 24 Mar 2024 16:06:55 +0100 Subject: [PATCH] fix watchers. --- src/component/main.vue | 2 +- src/component/overlay.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/component/main.vue b/src/component/main.vue index 41349acf..a780130e 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -706,7 +706,7 @@ function onResize() { } } -watch(() => state.screen.size, onScreenSyncChange) +watch(() => state.screen.size, onResize) function updateConnectionType() { if (screencast.value) { diff --git a/src/component/overlay.vue b/src/component/overlay.vue index f0361bcc..c35d61cd 100644 --- a/src/component/overlay.vue +++ b/src/component/overlay.vue @@ -174,7 +174,7 @@ onMounted(() => { } keyboard.listenTo(textarea.value!) - // bind touch handler using @Watch on supportedTouchEvents + // bind touch handler using `watch` on supportedTouchEvents // because we need to know if touch events are supported // by the server before we can bind touch handler @@ -532,7 +532,7 @@ function onTextInputChange() { textInput.value = '' } -watch(() => textInput.value, onTextInputChange) +watch(textInput, onTextInputChange) function onWheel(e: WheelEvent) { if (!props.isControling) { @@ -713,8 +713,8 @@ function restartInactiveCursorInterval() { } watch(focused, restartInactiveCursorInterval) -watch(() => props.inactiveCursors, restartInactiveCursorInterval) watch(() => props.isControling, restartInactiveCursorInterval) +watch(() => props.inactiveCursors, restartInactiveCursorInterval) function saveInactiveMousePos(e: MouseEvent) { const pos = getMousePos(e.clientX, e.clientY)