Skip to content

fix: bugs with tab-handling in text-input mode #962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

OlaAlsaker
Copy link
Contributor

Describe your changes

Fixes 2 bugs that occurs when pressing TAB while using text-input mode:

Bug: If you write a date and press tab, the focus will go to the clear-button. When tabbing away from the button (either back to input, or further down the page), the value will reset because it fetches the value from the wrong element.

Fix: The value is now fetched directly from the inputRef in handleTab. This is because the previous code would get the value from ev.target which will be the clear-button (<button>) when TAB'ing.

Bug: When pressing TAB, the focus switches to the clear-button. However, the string is not automatically parsed.

I would expect the string to be parsed as soon as i pressed TAB, even though the focus shifts to the clear-button. I have therefore updated the handleTab to do that.

Issue ticket number and link

Fixes #961

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have ensured that unit tests pass without errors
  • If it is a new feature, I have added a new unit test

Copy link
Contributor

@Jasenkoo Jasenkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will correct it, tnx for the PR.

@Jasenkoo Jasenkoo merged commit fce5ad7 into Vuepic:main Aug 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tabSubmit does not work when clearable is enabled
2 participants