This repository was archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
1.0a3: Dialog Stability #998
Copy link
Copy link
Closed
Labels
Description
Let's assume the following simple example:
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" />
<script src="http://code.jquery.com/jquery-1.5.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>
</head>
<body>
<div data-role="page" id="welcome">
<div data-role="header">
<h1>Welcome</h1>
</div>
<div data-role="content" data-theme="d">
<p>Some content...</p>
</div>
<div data-role="footer"><h4>
<a href="#info-dialog" data-rel="dialog" data-role="button" data-icon="arrow-r">Info</a>
</h4></div>
</div>
<div data-role="page" id="info-dialog">
<div data-role="header">
<h1>Info Dialog</h1>
</div>
<div data-role="content" data-theme="d">
<p>Some info content...</p>
</div>
<div data-role="footer"><h4>
<a href="#welcome" data-rel="dialog" data-role="button" data-icon="back">Back</a>
</h4></div>
</div>
</body>
</html>
To reproduce the bug:
- Load page
"welcome" page is displayed - Hit "Info" button
- Close dialog with "X" button
no problem so far - Open dialog again, "Info"
- Close dialog with "Back" button
the URL changes to#&ui-state=dialog&ui-state=dialogfor the "welcome" page - Open dialog again, "Info"
- Close dialog, "X"
you will see a "Error Loading Page" and navigation stops working. App broken.
An observation regarding this behaviour:
When the dialog opens for the first time, the URL changes to #&ui-state=dialog
If the user hits Refresh/F5 right now, he will see a blank page. App broken.
I would have expected to see the "welcome" page again.
Remark:
I use the custom "Back" button only as an example for a more complex dialog that may have an ACK and a NACK button with onclicks triggering other JS actions...
Reactions are currently unavailable