Skip to content

Commit

Permalink
fix(VField): stopPropagation on Mousedown event for clearable icon
Browse files Browse the repository at this point in the history
fixes #16925
  • Loading branch information
yuwu9145 committed Mar 18, 2023
1 parent 9532d7e commit 0bbcf9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vuetify/src/components/VField/VField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ export const VField = genericComponent<new <T>() => {
}
}

function onClearableMousedown (e: MouseEvent) {
e.stopPropagation()
}

useRender(() => {
const isOutlined = props.variant === 'outlined'
const hasPrepend = (slots['prepend-inner'] || props.prependInnerIcon)
Expand Down Expand Up @@ -291,6 +295,7 @@ export const VField = genericComponent<new <T>() => {
<div
class="v-field__clearable"
v-show={ props.dirty }
onMousedown={ onClearableMousedown }
>
{ slots.clear
? slots.clear()
Expand Down

0 comments on commit 0bbcf9e

Please sign in to comment.