Skip to content
This repository

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

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

3 participants

Martin Sutherland Kin Blas Todd Parker
Martin Sutherland
sunpig commented June 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

Todd Parker

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

Martin Sutherland
sunpig commented June 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.

Todd Parker

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

Martin Sutherland
sunpig commented June 23, 2011

Pull request 1914 contains a fix: #1914

Kin Blas jblas referenced this issue from a commit June 23, 2011
Kin Blas Unit test for issue #1913 - unnecessary ajax call and duplicate DOM n…
…odes when refreshing a page with a dialog visible.
53d375c
Martin Sutherland sunpig closed this June 24, 2011
Martin Sutherland
sunpig commented June 24, 2011

Fix has been pulled into master.

Timmy Willison timmywil referenced this issue from a commit June 23, 2011
Kin Blas Unit test for issue #1913 - unnecessary ajax call and duplicate DOM n…
…odes when refreshing a page with a dialog visible.
eababf9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.