Skip to content

Commit 608386f

Browse files
authored
fix(Input): the input cannot focus when mouse pressed on the prefix or suffix
1 parent 4a37016 commit 608386f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/vc-input/BaseInput.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default defineComponent({
1414
const containerRef = ref();
1515
const onInputMouseDown: MouseEventHandler = e => {
1616
if (containerRef.value?.contains(e.target as Element)) {
17+
e.preventDefault();
1718
const { triggerFocus } = props;
1819
triggerFocus?.();
1920
}

0 commit comments

Comments
 (0)