Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
pagechangefailed not triggered when changing to non-existent internal page #2835
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.
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.