JQM 1.2 Popup scrolls to top of page when closed - on iPad/iPhone
I'm trying to use the new Popup feature in JQM 1.2. On iPhone/iPad (not desktop and didn't try other mobile devices), if the popup link is down the page so the screen has scrolled, then closing the popup causes the screen to scroll back to the top.
Below is the code I used for testing. It has a "page1" which is a one-item menu and a "page2" which has a bunch of text with a popup link near the bottom. Again, this works fine on a desktop, but the page scrolls to the top on closing the popup when tried on an iPhone/iPad. Any help would be appreciated.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>Popup Test</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div id='page1' data-role="page">
<div data-role="header" data-theme="d" data-position="fixed">
<h1>Popup Test</h1>
</div>
<div data-role="content">
<ul data-role="listview" data-inset="false" data-theme="d">
<li><a href="#page2">Popup Test</a></li>
</ul>
</div>
</div>
<div id='page2' data-role="page">
<div data-role="header" data-theme="d" data-position="fixed">
<a href="#page1" data-add-back-btn="true" data-icon="back" data-theme="d" data-direction="reverse" >Back</a>
<h1>Popup Test</h1>
</div>
<div data-role="content" data-theme="b" >
<div>
Top of page.<br />
A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />
A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />
A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />
A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />
A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />
A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />A bunch of text.<br />
<a href="#popup1" data-rel="popup">Open Popup</a>
A bunch of text.<br />
A bunch of text.<br />
A bunch of text.<br />
A bunch of text.<br />
A bunch of text.<br />
A bunch of text.<br />
A bunch of text.<br />
Bottom of page.
</div>
<div data-role="popup" id="popup1" data-theme="b">
Here is some popup text.
</div>
</div>
</div>
</body>
</html>