You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It's possible to end up with the search input being disabled with no way to re-enable it if a directional key press is used to show the dropdown or is the last keypress before the dropdown is closed/input is blurred progmatically.
Find you are unable to type in the input, and can't restore the ability to without refreshing the page.
(It's possible to type one character from this point if that character is used to open the dropdown as that keypress is handled separately).
Expected behavior
Searching is possible irregardless of the key used to open the dropdown.
Choices version and bundle
Present on at least 10.2.0 and 11.0.2
Desktop:
OS: Windows
Browser: Firefox, Chrome
Version 132.0.1, 131.0.6778.70
Additional context
It looks to be a result of _canSearch being set to false in the _onDirectionalKey method here:
I think this is because _canSearch is only set to true again in the onKeyUp handler which is bound to the input element. Removing this line seems to sort the issue.
I'm not sure whether this would have any side effects - perhaps unnecessary searches in the onInput handler?
Describe the bug
It's possible to end up with the search input being disabled with no way to re-enable it if a directional key press is used to show the dropdown or is the last keypress before the dropdown is closed/input is blurred progmatically.
To Reproduce
(It's possible to type one character from this point if that character is used to open the dropdown as that keypress is handled separately).
Expected behavior
Searching is possible irregardless of the key used to open the dropdown.
Choices version and bundle
Desktop:
Additional context
It looks to be a result of _canSearch being set to false in the _onDirectionalKey method here:
Choices/src/scripts/choices.ts
Line 1775 in a127f82
I think this is because _canSearch is only set to true again in the onKeyUp handler which is bound to the input element. Removing this line seems to sort the issue.
I'm not sure whether this would have any side effects - perhaps unnecessary searches in the onInput handler?
Choices/src/scripts/choices.ts
Line 1662 in a127f82
I don't know if it's possible for an input event to be triggered from up/down/page up/page down though.
The text was updated successfully, but these errors were encountered: