Skip to content

bug: Conflict between ion-input “disabled” and ion-button #25384

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

Closed
4 of 7 tasks
polfernandez opened this issue Jun 1, 2022 · 3 comments
Closed
4 of 7 tasks

bug: Conflict between ion-input “disabled” and ion-button #25384

polfernandez opened this issue Jun 1, 2022 · 3 comments
Labels

Comments

@polfernandez
Copy link

polfernandez commented Jun 1, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

Using Ionic 6.1, I am trying to have an ion-item that contains both a disabled input and an enabled ion-button. However, adding the disabled flag to the input causes the button to be disabled (although its color remains as if enabled). (Removing disabled from the input, or replacing it with readonly makes the button work again.)
Here is the code where I discovered this effect:

      <ion-item>
        <ion-label position="floating">Email pending verification</ion-label>
        <ion-input [value]="user.email_to_be_verified" disabled></ion-input>
        <ion-button slot="end" (click)="saveAccount(true)">
          Cancel
        </ion-button>
      </ion-item>

Expected Behavior

Ionic button should be clickable even if ion-input is disabled.

Steps to Reproduce

  <ion-item>
    <ion-label position="floating">Email pending verification</ion-label>
    <ion-input [value]="user.email_to_be_verified" disabled></ion-input>
    <ion-button slot="end" (click)="saveAccount(true)">
      Cancel
    </ion-button>
  </ion-item>

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.13.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.1.7
@angular-devkit/build-angular : 13.3.7
@angular-devkit/schematics : 12.2.14
@angular/cli : 13.1.2
@ionic/angular-toolkit : 4.0.0

Capacitor:

Capacitor CLI : 3.5.1
@capacitor/core : 3.5.1

Utility:

cordova-res : not installed
native-run (update available: 1.6.0) : 1.5.0

System:

NodeJS : v18.2.0 (/usr/local/bin/node)
npm : 8.9.0
OS : macOS

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jun 1, 2022
@polfernandez
Copy link
Author

related to #18670, which says that by adding:
ion-item { pointer-events: auto; }

it triggers the button event.

@liamdebeasi liamdebeasi self-assigned this Jun 1, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to close this as a duplicate of #23331. The issue specifically mentions ion-chip, but it applies to ion-button as well.

@liamdebeasi liamdebeasi removed their assignment Jun 1, 2022
@ionitron-bot
Copy link

ionitron-bot bot commented Jul 1, 2022

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 Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants