Skip to content

Fix issue preventing calculateCaretPosition from calculating correctly. #711

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 3 commits into from
Jul 31, 2019

Conversation

csmith93
Copy link
Contributor

@csmith93 csmith93 commented May 15, 2019

Since calculateCaretPosition is being called in a timeout el.data('mask-previus-value') was being updated prior to calculateCaretPosition executing. The net outcome of this was oldVal === newVal, so it'd never run anything inside the if statement on line 193.

This caused the issues in #602 to show up again, which is how I discovered this.

Fix is to just cache the oldVal when the timeout is created, and pass it in to the function directly.

csmith93 added 3 commits May 15, 2019 09:08
Fixed an issue that's occurring in at least Chrome 74. Symptoms were the same as igorescobar#602.
was unneeded and failing tests
@igorescobar
Copy link
Owner

I will test this today @csmith93 thanks!

@igorescobar igorescobar merged commit 55c0738 into igorescobar:master Jul 31, 2019
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.

2 participants