jquery/jquery-mobile — Issue #2835: pagechangefailed no triggered when changing to non-existent internal page
Author: offsky
Created: 2011-10-25 16:51:35+00:00
State: open

When a link contains a hashtag (hfref="#foo"), clicking on it should load the page div in the DOM with that id. If a page with that id does not exist, it should trigger an error and not transition. What happens instead is that a duplicate page is created for the root URL and inserted into the DOM and an incorrect transition is made.

```

This doesn't exist but no error is given

This doesn't exist and an error is given

```

Clicking on the "#foo" link: The DOM now has two pages with the same id "home", and no pagechangefailed event was triggered.

What I would like to happen is that the pagechangefailed error is triggered, and no transition happens and nothing is inserted into the DOM. This will give me the opportunity to create the missing page.