From 7a30dbc839faa1ebcfda0e876171f0daa9068e64 Mon Sep 17 00:00:00 2001 From: Carlos Daniel Vilaseca Date: Sun, 3 Mar 2024 23:05:16 -0500 Subject: [PATCH] rf: added Element to variable names --- src/lib/components/chat/MessageInput.svelte | 16 ++++++++-------- src/routes/(app)/+layout.svelte | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 438d700c7..5a7e8a05d 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -19,7 +19,7 @@ export let suggestionPrompts = []; export let autoScroll = true; - let chatTextArea:HTMLTextAreaElement + let chatTextAreaElement:HTMLTextAreaElement let filesInputElement; let promptsElement; @@ -43,9 +43,9 @@ let speechRecognition; $: if (prompt) { - if (chatTextArea) { - chatTextArea.style.height = ''; - chatTextArea.style.height = Math.min(chatTextArea.scrollHeight, 200) + 'px'; + if (chatTextAreaElement) { + chatTextAreaElement.style.height = ''; + chatTextAreaElement.style.height = Math.min(chatTextAreaElement.scrollHeight, 200) + 'px'; } } @@ -84,7 +84,7 @@ if (res) { prompt = res.text; await tick(); - chatTextArea?.focus(); + chatTextAreaElement?.focus(); if (prompt !== '' && $settings?.speechAutoSend === true) { submitPrompt(prompt, user); @@ -187,7 +187,7 @@ prompt = `${prompt}${transcript}`; await tick(); - chatTextArea?.focus(); + chatTextAreaElement?.focus(); // Restart the inactivity timeout timeoutId = setTimeout(() => { @@ -289,7 +289,7 @@ }; onMount(() => { - window.setTimeout(() => chatTextArea?.focus(), 0); + window.setTimeout(() => chatTextAreaElement?.focus(), 0); const dropZone = document.querySelector('body'); @@ -657,7 +657,7 @@