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

Refreshing page while a dialog is visible causes unnecessary ajax call and duplicate DOM nodes #1913

Closed
sunpig opened this Issue Jun 23, 2011 · 5 comments

Comments

Projects
None yet
3 participants
@sunpig
Contributor

sunpig commented Jun 23, 2011

This feels like it is related to issue 1604 (#1604); it is certainly related to navigation.

For a page (e.g. navtest.html) where there is a page and a dialog declared inline on the page, the following repro steps lead to problems:

  1. Load the page
  2. Open the dialog (URL goes to http://.../navtest.html#myPage&ui-state=myDialog
  3. Don't close the dialog; instead, just refresh the page

When the page refreshes with the URL http://.../navtest.html#myPage&ui-state=myDialog, after page load the framework does the following:

  1. it makes a follow-up ajax call to http://.../navtest.html
  2. it extracts the #myPage div from the ajax request, and
  3. inserts it into the DOM

This means that there are now 2 instances of #myPage in the DOM.

Full repro steps and example code here: http://jsbin.com/ekugi4/2

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Jun 23, 2011

Contributor

Seems like we're not checking properly to see if that page is already in the DOM. Thanks for reporting.

Contributor

toddparker commented Jun 23, 2011

Seems like we're not checking properly to see if that page is already in the DOM. Thanks for reporting.

@sunpig

This comment has been minimized.

Show comment
Hide comment
@sunpig

sunpig Jun 23, 2011

Contributor

I think I've got a fix for this. I'm about to create a fork & will make a pull request if it works.

Contributor

sunpig commented Jun 23, 2011

I think I've got a fix for this. I'm about to create a fork & will make a pull request if it works.

@toddparker

This comment has been minimized.

Show comment
Hide comment
@toddparker

toddparker Jun 23, 2011

Contributor

Good news, we'll keep an eye out for it.

Contributor

toddparker commented Jun 23, 2011

Good news, we'll keep an eye out for it.

@sunpig

This comment has been minimized.

Show comment
Hide comment
@sunpig

sunpig Jun 23, 2011

Contributor

Pull request 1914 contains a fix: #1914

Contributor

sunpig commented Jun 23, 2011

Pull request 1914 contains a fix: #1914

@ghost ghost assigned jblas Jun 23, 2011

jblas added a commit that referenced this issue Jun 23, 2011

Unit test for issue #1913 - unnecessary ajax call and duplicate DOM n…
…odes when refreshing a page with a dialog visible.
@sunpig

This comment has been minimized.

Show comment
Hide comment
@sunpig

sunpig Jun 24, 2011

Contributor

Fix has been pulled into master.

Contributor

sunpig commented Jun 24, 2011

Fix has been pulled into master.

@sunpig sunpig closed this Jun 24, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment