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

[Bug]: Input causes browser to crash of typing to fast or holding key down. #745

Open
USMCrules02 opened this issue Jul 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@USMCrules02
Copy link

Bug description

When holding a key down or typing too fast the browser tab get overloaded and will crash.

Expected behavior

There should not be a crash from input.

Steps to reproduce

  1. Click on the Tom select
  2. Hold any key down

Additional context

The problem stems from the onInput() function cause by the 'Input' event listener.

If searching is disabled this event listener seems to not be needed as it functions properly without it. Without the event listener there is no crash when holding a key down.

The function needs some optimizations to be able to not crash, it could be beneficial to add a delay before it accepts another event.

@USMCrules02 USMCrules02 added the bug Something isn't working label Jul 17, 2024
@AlexanderShchedrin
Copy link

same problem

@nwalters512
Copy link
Contributor

What browser are you using? I'm unable to reproduce this in the latest versions of either Chrome or Safari on the "Basic Examples" page of the docs (https://tom-select.js.org/examples/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants