Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

1.0a3: Dialog Stability #998

@cryxli

Description

@cryxli

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:

  1. Load page
    "welcome" page is displayed
  2. Hit "Info" button
  3. Close dialog with "X" button
    no problem so far
  4. Open dialog again, "Info"
  5. Close dialog with "Back" button
    the URL changes to #&ui-state=dialog&ui-state=dialog for the "welcome" page
  6. Open dialog again, "Info"
  7. 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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions