From c1179b35ef90e733cd6383f0edf93c5b45c0f652 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 8 Aug 2022 15:58:31 -0700 Subject: [PATCH] try fix --- package.json | 2 +- packages/client/src/components/media-caption.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f043ecb872..5152afc985 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.118.1-calc.rc.4", + "version": "12.118.1-calc.rc.4.1", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/components/media-caption.vue b/packages/client/src/components/media-caption.vue index 969b531653..96606a8b29 100644 --- a/packages/client/src/components/media-caption.vue +++ b/packages/client/src/components/media-caption.vue @@ -146,6 +146,7 @@ export default defineComponent({ caption: async () => { const img = document.getElementById('imgtocaption'); + const textarea = document.getElementById("captioninput"); await worker.load(); await worker.loadLanguage('eng'); await worker.initialize('eng', OEM.LSTM_ONLY); @@ -153,9 +154,8 @@ export default defineComponent({ tessedit_pageseg_mode: PSM.SINGLE_BLOCK, }); const { data: { text } } = await worker.recognize(img); - const allowedLength = 512 - this.inputValue.length; - // @ts-ignore - document.getElementById("captioninput").value += text.slice(0, allowedLength); + const allowedLength = 512 - textarea.value.length; + textarea.value += text.slice(0, allowedLength); }, }, });