Skip to content

Selectmenu: Guard selection when the native select is disabled - #2426

Open
Xapollon430 wants to merge 1 commit into
jquery:mainfrom
Xapollon430:codex/guard-disabled-selectmenu-selection
Open

Xapollon430 wants to merge 1 commit into
jquery:mainfrom
Xapollon430:codex/guard-disabled-selectmenu-selection

Conversation

@Xapollon430

Copy link
Copy Markdown

Problem

Selectmenu can update a native select after it becomes disabled while the menu is open. The menu still applies the selected option and emits widget events.

Fixes #2425.

Reproduction

Open a Selectmenu with Apple selected. Disable the original select, then click Banana in the still-open menu. The disabled select changes to Banana. Reproduction video

Fix

Check the original select's live disabled state before committing a selection. If it is disabled, dismiss the open menu and leave the original selection intact.

Verification

The native Chrome click changed Apple to Banana before the patch. It preserved Apple and emitted no selection afterward. The new QUnit regression failed on the original source, and all 47 Selectmenu tests passed with the fix.

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Missing ID

  • ❌ The email address for the commit (4763916) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please visit our EasyCLA portal and chat with our support bot.

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

Development

Successfully merging this pull request may close these issues.

Selectmenu changes selection after its native select is disabled while open

1 participant