Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
patricsteiner opened this issue May 19, 2021 · 5 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@patricsteiner
Copy link

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
@ionitron-bot ionitron-bot bot added the triage label May 19, 2021
@liamdebeasi
Copy link
Contributor

Thanks for the issue. We probably need to extend dfa2b13 to account for other interactive components.

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels May 19, 2021
@ionitron-bot ionitron-bot bot removed the triage label May 19, 2021
@sazerzac
Copy link

sazerzac commented Oct 6, 2021

This is also the case with ion-button (@ionic/angular 5.8.1). You can recreate by adjusting the previous stackblitz as well. Fixable with the css used in #18670.

@liamdebeasi
Copy link
Contributor

Hi there,

We are proposing some changes to form components that seek to resolve this issue. We would love your feedback on these proposed changes! You can read more about the changes and leave comments here: #25661

@liamdebeasi
Copy link
Contributor

Thanks for the report. In Ionic 7 we are revamping the ion-input infrastructure to decouple it from ion-item. The new feature is opt-in to make migration easier, but this issue should be resolved using that new feature. We will have a beta for Ionic 7 in the future where developers can test and provide feedback. We will also have a migration guide for how to update to the new ion-input syntax.

The work required to resolve this issue has been completed, so I am going to close this thread. Let me know if there are any questions.

@ionitron-bot
Copy link

ionitron-bot bot commented Feb 10, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Feb 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

3 participants