You can clone with
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
Seems like we're not checking properly to see if that page is already in the DOM. Thanks for reporting.
I think I've got a fix for this. I'm about to create a fork & will make a pull request if it works.
Good news, we'll keep an eye out for it.
Pull request 1914 contains a fix: #1914
Unit test for issue #1913 - unnecessary ajax call and duplicate DOM n…
…odes when refreshing a page with a dialog visible.
Fix has been pulled into master.