Skip to content

fix: ignore clicks on disabled autocomplete suggestions - #905

Open
Xapollon430 wants to merge 1 commit into
tkirda:masterfrom
Xapollon430:codex/disabled-open-autocomplete
Open

Xapollon430 wants to merge 1 commit into
tkirda:masterfrom
Xapollon430:codex/disabled-open-autocomplete

Conversation

@Xapollon430

Copy link
Copy Markdown

Summary

Closes #904.

An open Autocomplete can still change the input and fire onSelect after disable(). Check the plugin’s disabled state in the delegated suggestion click handler, as the keyboard handlers already do.

Reproduction

Type Al into an input with Alpha and Alpine as local suggestions. Call disable() while the suggestions are open, then click Alpine.

Chrome reproduction video

Test plan

  • npm test (43 passed). The new test fails on the original source and passes with the change. It also verifies that selection works after enable().
  • npm run lint, npm run format:check, npm run typecheck, and npm run build.
  • A normal Chrome click after disable() preserves Al and leaves the callback count at zero.

This branch has not been deployed

No deployments
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.

Suggestion click changes the input after disable()

1 participant