jquery/jquery-mobile — Issue #3248: id=, data-id=, not being respected/tested first ?
Author: itechnology
Created: 2011-12-12 15:01:21+00:00
State: open

There seems to be a problem with duplicate pages appearing in the dom under certain circumstances, and once this happens, all js dealing with selectors stops working because of dupe element id's

The problem seems to be that data-url seems to be acting like the godly id attribute.

If i go to a page, for example: /somepage?somevar=somevalue, it gets loaded into the dom with data-url="/somepage?somevar=somevalue"

Now if i go to this page again, but access it via /somepage only, we get a duplicate entry in the dom ... one with: data-url="/somepage?somevar=somevalue", and another one with: data-url="/somepage"

I tried setting the id of the div, the data-id on the div, and even data-dom-cache="false", nothing seems to break this behavior.

JQM should probably be checking id/data-id before relying on data-url, or something like that 1st ?