Opened 5 years ago

Closed 5 years ago

#18265 closed defect (wontfix)

iOS8 - Events not working after screen lock

Reported by: Michael Michalowski Owned by: Adrian Vasiliu
Priority: undecided Milestone: tbd
Component: DojoX Mobile Version: 1.10.1
Keywords: Cc:
Blocked By: Blocking:

Description

There seems to be a Problem with the dojo event system and iOS8 under the following circumstances:

  1. Web-App is offline capable and attached to the home screen
  2. Screen was locked by switching the screen off and on again or by automatic screen lock

I noticed in my webapp that dojo/on events are not working, when my ipad 2 was locked and unlocked. So I created a simple jsfiddle for better reproducibility: http://jsfiddle.net/ofusgttx/7/

Use this URL on a iOS8 Device to attach the fiddle to the home screen: http://fiddle.jshell.net/ofusgttx/7/show/light/

The Fiddle shows three views and a very simple EdgeToEdgeList? for navigation. After the device was locked and unlocked the navigation is not working any longer.

Tested on an iPad 2 with iOS8.0 (12A365). The fiddle uses dojo nightly (1.10.1 is missing in jsfiddle), my web app uses 1.10.1.

I'm not sure if this is a dojo mobile or more an iOS8 issue.

Change History (6)

comment:1 Changed 5 years ago by Adrian Vasiliu

I tried to reproduce using your URL (http://fiddle.jshell.net/ofusgttx/7/show/light/ ) on iPad 4 iOS 8.0.2 (12A405), and I do not reproduce. More precisely, this is my testing sequence:

  1. Load the url in Safari
  2. Add it to home screen.
  3. Launch the app from the home screen.
  4. Navigate (touching list items and back button)
  5. Switch the screen off, then on again.
  6. Try again to navigate

==> still works.

Is your testing sequence different?

Just in case, can you try updating to iOS 8.0.2? (I assume your iPad 2 is a real device, not a simulator - if it is not, it might be a simulator issue).

Also, I notice your code mixes the use of the code from the nightly archive with the import of the old iphone.css from Dojo 1.7.1... I'd suggest checking the doc at http://dojotoolkit.org/reference-guide/1.10/dojox/mobile/deviceTheme.html. Apparently this is unrelated, I just mention it in case you missed it. Finally, your markup uses "dojox.mobile.Heading" (with dot notation) while it does not require the module. I suggest switching to / notation "dojox/mobile/..." for all widgets in markup and/or adding the require for all missing modules.

Finally, if there would be an issue with the "add to home screen mode", I wouldn't be very surprised, because in the past I've seen issues and complaints about iOS 8 troubles with it. That said, again, with iOS 8.0.2 I don't seem to reproduce what you say. Or maybe the issue would hold for iPad 2 under iOS 8 but not for iPad 4... but this seems unlikely.

comment:2 Changed 5 years ago by Adrian Vasiliu

Owner: set to Adrian Vasiliu
Status: newassigned

comment:3 Changed 5 years ago by Michael Michalowski

Ok, please forget about the fiddle. This issue only occurs in full screen mode and I guess in your test the home screen link opened the fiddle with browser location and toolbar visible. It seems to me that there is no way to open a fiddle in real full screen mode. In my tests it only worked, because I called the fiddle several times in safari before.

I got a better sample for reproducibility, the demo from the dojo mobile tutorial: http://dojotoolkit.org/documentation/tutorials/1.10/mobile/flickrview/part1/demo/sample2.html

I reproduced the issue on an iPad2 and an iPad mini, both running iOS 8.0.2.

Finally I also share your opinion that this issue is probably located in iOS itself, rather than in Dojo Mobile.

comment:4 Changed 5 years ago by Michael Michalowski

If the error occurs the following message is visible at the console:

"Deprecated attempt to access property 'target' on a non-Event object."

comment:5 Changed 5 years ago by Adrian Vasiliu

The error message is exactly the one I mentioned here: https://github.com/dojo/dojo/pull/110#issuecomment-53858660 This confusingly looks as an error (because of the red color and exclamation mark), but it does not interrupt the execution flow. You get it because the deployed tutorial uses a built version of Dojo which strips the strict mode (in dojo/on and everywhere else).

All in one, as written in the comment pointed above, this message is expected (in non-strict mode) and harmless. The real cause of the trouble seems an Apple's side. Hence, I close the issue for now as "won't fix".

comment:6 Changed 5 years ago by Adrian Vasiliu

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.