i'm just working on an application. After i started last week i added a few pages. Today i tried to implement the backbutton and i lose my head... four hours now i tried to get it working but i'm not able to because there are some strange behaviours in iOS 9.
So my hardware setup for better understanding:
- Mac Mini - OS X - Yosemite 10.10.5
- iPhone 6S - iOS 9.0.1 (13A405)
- iPhone 6+ - iOS 9.0 BETA (13A4305g)
- iPhone 5 - iOS 9.0 (13A344)
- iPad 4 - iOS 8.3 (12F69)
My application setup for better understanding:
- Cordova at version 5.3.3
- Cordova platform iOS at version 3.9.1
- jQuery at 2.1.4 minified
- jQuery mobile at 1.4.5 minified
The problem
So i want to implement a back button inside my application via jQuery. Normaly the way would be to add a href
with attributes like data-rel="back"
and data-transition="reverse"
. So my code looks like this:
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" type="text/css" href="css/jquery.mobile.structure-1.4.5.min.css">
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<title>Hello World</title>
</head>
<body>
<div data-role="page" id="page1">
This is page 1<br />
<br />
<a href="#page2" data-transition="slide">
Go to page 2
</a>
</div>
<div data-role="page" id="page2">
This is page 2<br />
<br />
<a href="#" data-rel="back" data-transition="reverse">
Go back to page 1
</a>
</div>
</body>
</html>
The back button is not working in iOS 9 and iOS 9.0.1. In iOS 8.3 everything works fine. So is there anything known about this issue? Someone heard about it? Or am i totaly wrong and did something the wrong way? As i'm not able to test it on android it would be great if someone could do this.
http://codepen.io/anon/pen/vNyrgB
Waiting for your feedback now... Thanks in advance!