documentcloud/backbone — Issue #849: Routing issues created by (merged) Pull Request #599
Author: jayred
Created: 2012-01-07 08:00:05+00:00
State: open

## Copying my comments from #599

###### Issue #1 -- Breaks old routes
This needs to be documented somewhere because it breaks the Router from the current 0.5.3 release. In the currently available 0.5.3 release on the public Github pages site (documentcloud.github.com/backbone), calling ```router.navigate('/search', true)``` will match only the route ```"/search"```. This change causes the only matched route to be ```"search"``` (no leading slash).

I support this being the correct action, but it will break EVERY site's routing that used a leading slash. I discovered this because I was not using pushState and was routing all my paths as ```abc.com/#/search``` because it gave the path a nice structure with that leading fragment slash.

###### Issue #2 -- Preventing re-routing to the same fragment
A further complication introduced by this is that Backbone no longer knows if you are trying to route to the same page. Previously, if you tried to route to the same page, the Router would never receive the request. Now, it routes again.