mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 10:14:26 +08:00
check whether event target is input element
This commit is contained in:
@@ -263,7 +263,7 @@ function onPaste(e: ClipboardEvent): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onClick(e: MouseEvent): 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;
|
const input = e.target as HTMLInputElement;
|
||||||
input?.select();
|
input?.select();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user