bug: canceling swipe back animation causes white screen on android devices
See original GitHub issueBug Report
Ionic version:
[x] 5.x
Current behavior:
Using swipe gestures to navigate back on Android devices leaves the screen completly white if the gesture is canceled mid-way.
Expected behavior:
Swipte back gesture should show the previous screen.
Steps to reproduce:
- Push a new page in the view stack with
navigateForward
- Start the swipe back gesture (finger on left device side and move to the right)
- … while holding the finger down, move back to the left side (to cancel the swipe animation) ==> Screen stays white
You can perform the gesture in a few milliseconds or take your time and do it very slowly. It is 100% reproducible.
Related code:
Enable the following in the app.module.ts
IonicModule.forRoot({
swipeBackEnabled: true
}),
https://github.com/capc0/ion-android-swipe-gesture-white-screen
Other information:
Ionic info:
Ionic:
Ionic CLI : 5.4.9 (C:\Users\Simon\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.0, (and 4 other plugins)
Utility:
cordova-res : 0.6.0 (update available: 0.12.0)
native-run : 0.2.8 (update available: 1.0.0)
System:
NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.13.7
OS : Windows 10
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
bug: canceling swipe back animation causes white screen on ...
Bug Report · Push a new page in the view stack with navigateForward · Start the swipe back gesture (finger on left device...
Read more >Gestures still broken. Leads to "touch problem" or "animation ...
When you swipe very very fast and swiftly from the edge of the screen towards the middle, user can notice that system is...
Read more >Why Android's gesture navigation fails (and how to fix it)
On Android, a swipe up will bring the user to the recents menu, which is fine, that's not the problem. The problem is...
Read more >Flutter: Disable Swipe to Navigate Back in iOS and Android
I simply changed "return false" to "return true", so that the hardware and appbar back buttons work while the swipe back is still...
Read more >Animation | Jetpack Compose - Android Developers
Overview. Animations are essential in a modern mobile app in order to realize a smooth and understandable user experience. Many Jetpack Compose Animation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
LGTM. thanks for the quick response.
The problem seems to be that the ``display: none``` style does not get removed when canceling the animation
edit: I just checked your commit (https://github.com/ionic-team/ionic/pull/21058/files), seems to me like
leavingPage.elements[0]
focuses the wrong HTML element.