Skip to content

Ignore popup selection after disabling Combobox or Multiselect - #1171

Open
Xapollon430 wants to merge 1 commit into
jquense:masterfrom
Xapollon430:codex/disabled-popup-selection
Open

Xapollon430 wants to merge 1 commit into
jquense:masterfrom
Xapollon430:codex/disabled-popup-selection

Conversation

@Xapollon430

Copy link
Copy Markdown

Fixes #1170.

Problem

  1. Open an enabled Combobox or Multiselect with Apple selected.
  2. Set disabled to true while the application keeps the popup open.
  3. Click Orange. Combobox switches to Orange, and Multiselect adds it. Both emit selection and change events.

Watch the Combobox reproduction. It uses the repository's widget styles.

An async update can disable the outer control while the user is choosing an option. The application owns the popup's visibility when it supplies open. Both selection handlers now check the current disabled state before applying an option, following the existing guard in DropdownList.

I found this interaction while testing component state transitions in Anta, then reproduced it separately in React Widgets.

Validation

Both regressions fail on current master and pass with the fix. Real Chrome clicks confirm that both widgets keep Apple and emit zero change events after disabling. The package's lint check and all 137 enabled tests pass.

AI-assisted implementation and testing.

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.

Combobox and Multiselect accept popup selection after becoming disabled

1 participant