Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog reappears on forward action (should be remove from history instead) #194

Open
fluxi2 opened this issue May 25, 2013 · 1 comment
Open

Comments

@fluxi2
Copy link

fluxi2 commented May 25, 2013

Hello,

i have a problem with the following sample code. When I click on "Show Dialog" the dialog appears. So good so far. Then I close the dialog und I go forward (through browser button or mouse key). Now I see the dialog again, but that isn't the expected behavior. Dialogs should be removed from history stack.

I used the latest version of jquery-mobile-angular-adapter.

Is it a bug or how can I solve the problem?

sample.html

  <!DOCTYPE html>
  <html ng-app="myApp">
  <head>
    <meta charset="utf-8"/>
    <title>Sample</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.css"/>
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.js"></script>
    <script src="jquery-mobile-angular-adapter.js"></script>
    <script>
       var myAppModule = angular.module('myApp', []);
    </script>
  </head>
  <body>

  <div data-role="page" id="page1" data-fullscreen="true" data-title="Page 1">

    <div data-role="content">
      <a href="#dialog" data-transition="pop">Show Dialog</a>
    </div>
  </div>

  <div data-role="dialog" id="dialog">
    <div data-role="header">
      <h1>Dialog</h1>
    </div>
    <div data-role="content">
      Close this dialog and then forward again! This dialog will appear again.
    </div>
  </div>


  </body>
  </html>
@tbosch
Copy link
Contributor

tbosch commented May 28, 2013

Hi,
thanks! I double checked and your are right: Dialogs are not removed when trying to reach them using the forward button.
Note: They are removed if the dialog is reached using the back button, see this fiddle: http://jsfiddle.net/jsBZh/1/

Tobias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants