Skip to content

fix(select): ignore selection after disabling - #23154

Open
Xapollon430 wants to merge 1 commit into
ElemeFE:devfrom
Xapollon430:fix/select-disabled-while-open
Open

Xapollon430 wants to merge 1 commit into
ElemeFE:devfrom
Xapollon430:fix/select-disabled-while-open

Conversation

@Xapollon430

Copy link
Copy Markdown

Problem

  1. Open an enabled Select with Apple selected.
  2. Set disabled to true while the dropdown is open.
  3. Click Orange. It becomes selected and change still fires.

Watch the browser reproduction.

The recording uses Element's theme and ordinary pointer input against the original dev source and the same source with the fix.

Check the effective disabled state in handleOptionSelect. This covers a disabled Select or disabled enclosing Form without changing how the popup opens or closes. Re-enabling the Select restores normal selection.

I started investigating this transition while testing Anta with Hegel and Bombadil, then reproduced it in Element independently.

Validation

  • All 35 Select tests pass in Chromium through Karma. The new regression fails on the original source.

  • Chromium reproduction: before, Orange and one change; after, Apple and zero changes.

  • Scoped lint passes. npm run dist stops at an existing missing newline in src/locale/lang/lo-LA.js, reproduced on the original source.

  • Followed the contributing guide.

  • Targets dev.

  • Includes reproduction and regression coverage.

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.

1 participant