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: (ionChange) event of ion-picker-column not fired on iOS devices #29480

Closed
3 tasks done
losciur opened this issue May 9, 2024 · 3 comments
Closed
3 tasks done

bug: (ionChange) event of ion-picker-column not fired on iOS devices #29480

losciur opened this issue May 9, 2024 · 3 comments
Labels

Comments

@losciur
Copy link

losciur commented May 9, 2024

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

In a blank angular ionic project I tested the ion-picker in modal as described here: https://ionicframework.com/docs/api/picker#picker-in-modal

The ionChange event of the ion-picker-column (see https://ionicframework.com/docs/api/picker-column#events) works fine ONLY on android devices when the value change.
In iOS nothing is fired.

Expected Behavior

Same behavior as Android

Steps to Reproduce

  1. create a blank angular ionic project
  2. Insert code as the documentation in the home.page.html,home.poge.ts and home.page.scss files: https://ionicframework.com/docs/api/picker#picker-in-modal
  3. To check the bug add in home.page.ts one line to the onIonChange function:
  onIonChange(event: CustomEvent) {
    console.log("onIonChange fired!", event.detail.value) // ADD THIS LINE
    this.currentValue = event.detail.value;  
  }
  1. Try on an Android device: you see in the console the ionChange event fired when value change
  2. Try on an iOS device: nothing is fired when value change

Code Reproduction URL

https://github.com/losciur/ionic-bug-ion-column-picker

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/losciur/.nvm/versions/node/v18.19.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.1.1
@angular-devkit/build-angular : 17.3.7
@angular-devkit/schematics : 17.3.7
@angular/cli : 17.3.7
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 6.0.0
@capacitor/android : 6.0.0
@capacitor/core : 6.0.0
@capacitor/ios : 6.0.0

Utility:

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

System:

NodeJS : v18.19.0 (/Users/losciur/.nvm/versions/node/v18.19.0/bin/node)
npm : 10.2.3
OS : macOS Unknown

Additional Information

No response

@sean-perkins
Copy link
Contributor

Hello @losciur, I am not able to reproduce.

Please confirm that you have your Safari devtools to show all logs, not just errors:
CleanShot 2024-05-09 at 13 07 52

@sean-perkins sean-perkins added the needs: reply the issue needs a response from the user label May 9, 2024
@ionitron-bot ionitron-bot bot removed the triage label May 9, 2024
@losciur
Copy link
Author

losciur commented May 9, 2024

Hi, thanks for the quick answer.
After new tests I have to specify better.
My issue was generated trying the picker on a phisical iPad (fifth generation - iPadOS 16.7.5).
In that device, while I'm moving along the picker column values, or when I stop on a specific value, the (ionChange) doesn't fire.
But now, I found out that if after moving along the picker column values and stop on a specific value, I CLICK on the specific value, THEN the (ionChange) fires!

Other tests: if I use the simulator with more recent device (iOS 17), the (ionChange) correctly fire when I stop on a specific value (I don't need to click on it).

On Android: the (ionChange) fired when I stop on a specific value (no click needed)

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels May 9, 2024
@losciur
Copy link
Author

losciur commented May 15, 2024

I tested the problem in more recent models, and I found out that the bug is only in that old iPad (fifth generation - iPadOS 16.7.5).
I think it is possible to close the issue.
Thanks

@losciur losciur closed this as completed May 15, 2024
@thetaPC thetaPC closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
@thetaPC thetaPC removed their assignment May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants