Skip to content

bug: ion-chip is disabled when ion-input is disabled when both are in same ion-item #23331

Closed
@patricsteiner

Description

@patricsteiner

Bug Report

Ionic version:
[x] 5.x

Current behavior:
Given: ion-item that contains an ion-chip and an ion-input. I can interact with both (i.e. not disabled).
When ion-input is disabled, ion-chip will also be disabled.

Expected behavior:
Only ion-input should be disabled. ion-chip should not be disabled.

Steps to reproduce:

  1. Run the stackblitz below
  2. Verify that ion-chip is clickable (cursor changes and you can see a ripple effect)
  3. Disable the ion-input with the toggle button
  4. ion-chip is not clickable anymore

Related code:
https://stackblitz.com/edit/ionic-angular-v5-85pzwf?file=src/app/app.component.html

<ion-item>
  <ion-chip>
    <span>Why am I disabled?</span>
    <ion-icon name="close-circle"></ion-icon>
  </ion-chip>
  <ion-input [disabled]="true" placeholder="write something..."></ion-input>
</ion-item>

Other information:
Probably related: #18670

Ionic info:

Ionic:

   Ionic CLI                     : 6.14.1 (C:\Users\Patric\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.6.6
   @angular-devkit/build-angular : 0.1102.12
   @angular-devkit/schematics    : 11.2.12
   @angular/cli                  : 11.2.12
   @ionic/angular-toolkit        : 3.1.1

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v14.16.1 (C:\Program Files\nodejs\node.exe)
   npm    : 7.11.2
   OS     : Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions