mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
not select all text when user actively selects text
This commit is contained in:
@@ -267,8 +267,11 @@ function onPaste(e: ClipboardEvent): void {
|
|||||||
function onClick(e: MouseEvent): void {
|
function onClick(e: MouseEvent): void {
|
||||||
if (!props.disabled && !props.readonly && props.modelValue === 0 && e.target instanceof HTMLInputElement) {
|
if (!props.disabled && !props.readonly && props.modelValue === 0 && e.target instanceof HTMLInputElement) {
|
||||||
const input = e.target as HTMLInputElement;
|
const input = e.target as HTMLInputElement;
|
||||||
|
|
||||||
|
if ((!input?.selectionStart && !input?.selectionEnd) || input?.selectionStart === input?.selectionEnd) {
|
||||||
input?.select();
|
input?.select();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getValidFormattedValue(value: number, textualValue: string, hasDecimalSeparator: boolean): string {
|
function getValidFormattedValue(value: number, textualValue: string, hasDecimalSeparator: boolean): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user