Open Luo-Kuang opened 2 years ago
This is indeed quite an issue as Lou-Kuang says, and I'd like to chip in with some extra context to replicate the issue (and show its urgency).
So in short if webKit or the underlaying iOS presents a UIAlertController and whilst that is open, a alert(..), confirm(...)
is called, the app will be stuck.
This commonly happens if a user is prompted for some native permission, or shake the device to trigger "Shake to Undo".
As far as the javascript goes nothing is halted, so some event might trigger an alert()
or confirm()
.
An alternative/easy way to replicate this issue is execute:
setTimeout(function(){
alert('This will mess up');
}, 5000);
// Now shake the device (e.g. like a Polaroid picture),
// to trigger native Undo dialog....app wil be dead
Bug Report
Problem
What is expected to happen?
alert normaly
What does actually happen?
When I call JS alert in the present controller, the interface will be stuck
Information
[Presentation] Attempt to present <UIAlertController: 0x15201c200> on <MainViewController: 0x151e09ab0> (from <MainViewController: 0x151e09ab0>) whose view is not in the window hierarchy.
Command or Code
when I back to MainViewController, the interface will be stuck
Environment, Platform, Device
iOS
Version information
Apache Cordova native platform version 6.2.0
Checklist