Skip to content
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

fix(kit): Number incorrectly shift caret for 1st time insertion into textfield with initial value #1792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nsbarsukov
Copy link
Member

Fixes #1787

Copy link
Contributor

Visit the preview URL for this PR (updated for commit 424365b):

https://maskito--pr1792-number-fix-udgfleok.web.app

(expires Tue, 22 Oct 2024 14:50:57 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 61e4dea776cbea516b68c67840913d2edd88bb90

prefix,
postfix,
thousandSeparator: ' ',
describe('with prefix & postfix', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Tests inside this describe were not changed (just a new tabulation)

});

it('$6 4|32 kg => Delete => $64|2 kg', () => {
it('123 45|6 789 => Type 0 (the 1st time input event) => 1 234 50|6 789', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

New test starts here

Comment on lines -194 to +196
.should('have.prop', 'selectionStart', '00'.length)
.should('have.prop', 'selectionEnd', '00'.length)
.should('have.prop', 'selectionStart', '0'.length)
.should('have.prop', 'selectionEnd', '0'.length)
Copy link
Member Author

Choose a reason for hiding this comment

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

It was invalid assertion

@nsbarsukov nsbarsukov marked this pull request as ready for review October 21, 2024 14:57
@github-actions github-actions bot added the ready to merge ready label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 - Number incorrectly shift caret on the 1st insertion after mask initialization
2 participants