mantine icon indicating copy to clipboard operation
mantine copied to clipboard

PasswordInput component Issue on mobile

Open mnakhli opened this issue 1 year ago • 0 comments

Dependencies check up

  • [X] I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

Latest

What package has an issue?

@mantine/core

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

None

Describe the bug

On mobile, when I toggle the visibility after entering the password, the cursorPosition moves to the beginning of the entered value. (Video) -- This issue doesn't exist on the desktop and works correctly. -- Check it in Mantine documentation on mobile.

https://github.com/user-attachments/assets/d887da17-c831-42dc-82c2-a6ca5f26580b

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

The cursorPosition should always be at the end of the characters in every situation:

  • When the input is clicked for the first time on mobile.
  • When the toggle button for showing or hiding the password is pressed.
  • And in any other scenario, the cursorPosition should stay at the end of the characters and not move.

Self-service

  • [ ] I would be willing to implement a fix for this issue

mnakhli avatar Aug 11 '24 13:08 mnakhli