From 4878c7258d8ad954e3aa6506763268660b342977 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 27 Jan 2025 20:36:55 +0800 Subject: [PATCH] check whether event target is input element --- src/components/desktop/AmountInput.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/desktop/AmountInput.vue b/src/components/desktop/AmountInput.vue index 83dc442f..2e7a10f8 100644 --- a/src/components/desktop/AmountInput.vue +++ b/src/components/desktop/AmountInput.vue @@ -263,7 +263,7 @@ function onPaste(e: ClipboardEvent): void { } function onClick(e: MouseEvent): void { - if (!props.disabled && !props.readonly && props.modelValue === 0) { + if (!props.disabled && !props.readonly && props.modelValue === 0 && e.target instanceof HTMLInputElement) { const input = e.target as HTMLInputElement; input?.select(); }