Skip to content

Commit

Permalink
[@mantine/core] PasswordInput: Fix cursor shifting when the visibilit…
Browse files Browse the repository at this point in the history
…y button is clicked on touch devices (#6971)
  • Loading branch information
mmounirf authored Oct 16, 2024
1 parent 819ab44 commit eb05983
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ export const PasswordInput = factory<PasswordInputFactory>((_props, ref) => {
variant="subtle"
color="gray"
unstyled={unstyled}
onTouchEnd={(event) => {
event.preventDefault();
visibilityToggleButtonProps?.onTouchEnd?.(event);
toggleVisibility();
}}
onMouseDown={(event) => {
event.preventDefault();
visibilityToggleButtonProps?.onMouseDown?.(event);
Expand Down

0 comments on commit eb05983

Please sign in to comment.