Skip to content

Respect disabled fieldsets during option selection - #2891

Open
Xapollon430 wants to merge 1 commit into
snapappointments:devfrom
Xapollon430:codex/disabled-fieldset-open-menu
Open

Xapollon430 wants to merge 1 commit into
snapappointments:devfrom
Xapollon430:codex/disabled-fieldset-open-menu

Conversation

@Xapollon430

Copy link
Copy Markdown

Fixes #2890.

Problem

An open selectpicker appended to the body can change the native select’s value after its enclosing fieldset becomes disabled.

Reproduction

Open a selectpicker configured with container: 'body'. Disable its enclosing fieldset while the menu is visible, then click Beta.

Try the isolated reproduction

Chrome reproduction video

Changes

Use jQuery’s :disabled selector in the existing disabled check. It accounts for fieldset inheritance as well as the select’s own disabled attribute.

Verification

  • The Cypress regression fails on dev (Beta replaces Alpha) and passes with the patch in Chrome. The local run used Cypress binary 15.21.1.
  • npm run build passes.
  • A normal click in Chrome on the patched popup leaves Alpha selected and the change event 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.

1 participant