Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reproducible on iPad/iPhone 5.0 and 6.0 simulator
Description
Steps taken to reproduce:
1. Create custom container view controller
2. In viewDidLoad add two CDVViewControllers as childViewControllers and hook up view hierarchy appropriately
3. deviceready will fire for startPage on the first CDVViewController but not for the second
Workaround:
Add the second CDVViewController after some delay (e.g. 1 second)
Image:
http://localhostr.com/9JszfWk9b7Pa
More info:
After some investigation, the problem seems to be a manifestation of a race condition where the address of the CDVViewController passes in the user-agent is clobbered. This means sometimes one CDVViewController will get deviceready and at other times the other one will (but never both).
I believe this is another case where someone has reproduced this bug:
http://stackoverflow.com/questions/13082330/phonegap-cordova-with-multiple-cdvviewcontroller
Attachments (minimal example reproducing bug and workaround):
Attachments
Issue Links
- relates to
-
CB-3534 Multiple CDVViewControllers - deviceready not fired and cordova.exec events queued up till backgrounding
- Closed