title: jQueryMobile close dialog without page change
body: <p>I'm developping a web app with jQM. It's a mono-page app with a lot of script-generated virtual pages. I use a lot of dialog, and occasionally, closing those dialog make my app go back to the start page (3 pages back in the history).</p>
  
  <p>I can't make a test case, as it only occurs in complex cases, database based, and only on idevice, not on computer.</p>
  
  <p>I found a lot of similar issues, but all for jQM 1.2 or older. I'm using jQM 1.5.3.</p>
  
  <p>I added the <code>log-page-event.js</code> tool in my script, and it give me this :</p>
  
  <p>First, the page is loaded "visite_client-86871"</p>
  
  <pre><code>[Log] pagebeforeshow (1422376478507) (log-page-events.js, line 44)
      page: div.visite_client.ui-page.ui-page-theme-a.ui-page-header-fixed.ui-page-footer-fixed#visite_client-86871
      data-url: visite_client-86871
  
  [Log] hashchange (1422376481313) (log-page-events.js, line 44)
      location: http://m2.biocrm.fr/#visite_client-86871
  
  [Log] pagehide (1422376482645) (log-page-events.js, line 44)
      page: div.ui-page.ui-page-theme-a#edit_visite
      data-url: edit_visite
  
  [Log] pageshow (1422376483145) (log-page-events.js, line 44)
      page: div.visite_client.ui-page.ui-page-theme-a.ui-page-header-fixed.ui-page-footer-fixed.ui-page-active#visite_client-86871
      data-url: visite_client-86871
  
  [Log] pagechange (1422376483171) (log-page-events.js, line 44)
      page: div.visite_client.ui-page.ui-page-theme-a.ui-page-header-fixed.ui-page-footer-fixed.ui-page-active#visite_client-86871
      data-url: visite_client-86871
  </code></pre>
  
  <p>Then, I click open the dialog :</p>
  
  <pre><code>[Log] popstate (1422376499968) (log-page-events.js, line 44)
      location: http://m2.biocrm.fr/#visite_client-86871&amp;ui-state=dialog
      state.hash: 
  [Log] hashchange (1422376501192) (log-page-events.js, line 44)
      location: http://m2.biocrm.fr/#visite_client-86871&amp;ui-state=dialog
  </code></pre>
  
  <p>Then, I close the dialog :</p>
  
  <pre><code>[Log] popstate (1422376521377) (log-page-events.js, line 44)
      location: http://m2.biocrm.fr/#visite_client-86871
      state.hash: #visite_client-86871
  
  [Log] hashchange (1422376521403) (log-page-events.js, line 44)
      location: http://m2.biocrm.fr/#visite_client-86871
  </code></pre>
  
  <p>And with no reason, it return to the home page "tournees"</p>
  
  <pre><code>[Log] pagebeforechange (1422376521407) (log-page-events.js, line 44)
      page: div.ui-page.ui-page-theme-a.ui-page-footer-fixed#tournees
      data-url: tournees
  
  [Log] pagebeforechange (1422376521459) (log-page-events.js, line 44)
      page: div.ui-page.ui-page-theme-a.ui-page-footer-fixed#tournees
      data-url: tournees
  
  [Log] pagebeforehide (1422376521501) (log-page-events.js, line 44)
      page: div.visite_client.ui-page.ui-page-theme-a.ui-page-header-fixed.ui-page-footer-fixed.ui-page-active#visite_client-86871
      data-url: visite_client-86871
  </code></pre>
  
  <p>What could I do to detect the reason of the error, or to prevent it ?
  It looks like jQM is confused in his history. Is it possible to log it more precisely ?</p>
  
  <p>Thank you very much.</p>