-
Notifications
You must be signed in to change notification settings - Fork 1k
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
statusTap event not working on iOS 13 #2109
Comments
This is only on iOS 13, right? |
I have seen this issue on iOS 13.0 and 13.1 (iPhone XS Max, iPhone 11 Pro Max) so far. On Android and iOS 12.x (iPhone X) it worked as expected. |
The problem is statusTap event not working on iOS 13. Ionic uses that event to scroll the internal content. On a non Ionic app with content bigger than the screen, if you tap the status bar it will still scroll to top as expected. |
What do you suggest as workaround until it is fixed? Does the Cordova plugin have the same issue in iOS 13? |
The Cordova approach adds a scrollview off screen that forwards in the touch/tap event. It's a hacky solution that causes other problems. There isn't a great workaround until Apple makes changes to better support or fix statusTap in iOS. |
I've found another possible solution, but it's also hacky. We can swizzle handleTapAction on UIStatusBarManager class. (meaning, it removes the handleTapAction method and add a custom one that can send the event to javascript). So either way, the two possible options are hacky, not sure which one is better. |
The reason the statusTap event isn't called is because touchesBegan is no longer called on the AppDelegate on iOS 13. |
This works for me now, thanks a lot for fixing it! |
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 Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
npx cap doctor
output:Affected Platform(s)
Current Behavior
When tapping on status bar ion-content does not scroll to top
Expected Behavior
Scroll to top on tap
The text was updated successfully, but these errors were encountered: