Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
sunpig opened this Issue · 5 comments

3 participants

Martin Sutherland Todd Parker Kin Blas
Martin Sutherland

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

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

Pull request 1914 contains a fix: #1914

Kin Blas jblas was assigned
Kin Blas jblas referenced this issue from a commit
Kin Blas jblas Unit test for issue #1913 - unnecessary ajax call and duplicate DOM n…
…odes when refreshing a page with a dialog visible.
53d375c
Martin Sutherland

Fix has been pulled into master.

Martin Sutherland sunpig closed this
Timmy Willison timmywil referenced this issue from a commit
Kin Blas jblas 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.