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

Type to quickly Bug #8

Open
yusuferenayas opened this issue Feb 22, 2021 · 5 comments
Open

Type to quickly Bug #8

yusuferenayas opened this issue Feb 22, 2021 · 5 comments

Comments

@yusuferenayas
Copy link

yusuferenayas commented Feb 22, 2021

Hey everyone,

Creating this issue for this bug.

I am aware that there is a bug (mostly seems to occur in Chrome) where if you type to quickly sometimes the selection will spazz out and jump between inputs. I think it is a browser bug, but if anybody has any idea how to possibly fix this let me know please!

I think it's about pressing multiple key in same moment. If there is a some timeout callback that prevents key press for a while, like 100-200 ms. It might solve this problem.

@OneTuskedMario
Copy link

OneTuskedMario commented May 20, 2022

You can resolve this by wrapping _this3.focusNextChar(target); in a setTimeout function with 1ms delay in /dist/ReactIndividualCharacterInputBoxes.js
I've made a package with this change https://www.npmjs.com/package/react-individual-character-input-boxes3

@dannyradden
Copy link
Owner

I feel like I tried adding a delay once before but perhaps I didnt. Does it seem to have fixed the problem @OneTuskedMario ?

@dannyradden
Copy link
Owner

So I messed around with different timeouts and 1ms doesnt seem to make much of a difference but 5ms pretty much eliminates the problem. Thanks for the help OneTusk. Ill be updating this soon

@OneTuskedMario
Copy link

So I messed around with different timeouts and 1ms doesnt seem to make much of a difference but 5ms pretty much eliminates the problem. Thanks for the help OneTusk. Ill be updating this soon

No problem @dannyradden, glad I could help. Thanks for this package :))

@dannyradden
Copy link
Owner

After some more testing with timeouts it turns out that they don't actually seem to have any effect on the problem. Even set at 100ms it still jumps around, perhaps even more often. I am going to have to try to find a different way to fix the problem.

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

No branches or pull requests

3 participants