Skip to content

bug: ion-select accepts selection after becoming disabled while open #31687

Open

Description

@Xapollon430

If ion-select becomes disabled while its popup is open, the existing options can still change the selection and fire ionChange. The control should reject user selection once it is disabled.

Reproduction

  1. Click Disable in 3 seconds, then open the ion-select.
  2. Wait for Disabled: true.
  3. Click Orange. The selection changes from Apple to Orange while the control remains disabled.

Recorded against @ionic/core 9.0.10. Runnable reproduction includes the required styles and setup.

ionic-disabled-repro.mp4

Tested in Chromium on macOS. The application toggles disabled; popup state is managed by the library.

Activity

  1. thetaPC commented on Nov 3, 2026

    @thetaPC
    Contributor

    Thanks for the report.

    Verified on 9.0.10. ion-select checks disabled when it opens its overlay, but not when the open alert, action sheet, popover or modal commits a selection, so a pick made after disabled turns on still updates value and emits ionChange. This affects all four interfaces.

    Until a fix ships, restore the last committed value in your ionChange handler when the select is disabled. This is verified on 9.0.10 with all four interfaces:

    const select = document.querySelector('ion-select');
    let committed = select.value;
    
    select.addEventListener('ionChange', (ev) => {
      if (select.disabled) {
        select.value = committed;
        return;
      }
      committed = ev.detail.value;
      // handle the new value here
    });

    ionChange still fires for the rejected pick, so keep the disabled check in any handler that acts on the value. If your app also sets value programmatically, update committed there too.

    Tracked as a bug in core, with the fix under review in #31688.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions