emberjs/ember.js — pull request #9272 by jayphelps (2014-10-04 19:56:20+00:00)
Title: [BUGFIX] location: 'history' no longer blows away location.hash

This is Phase 2 of https://github.com/emberjs/ember.js/issues/4098.

Currently, if you're using `location: 'history'` and someone navigates to a URL with a hash in it (e.g. `/foo#bar`) `HistoryLocation` will call `history.replaceState()` without the `location.hash`, which immediately strips it from the URL and prevents the browser from natively scrolling the page to any HTML element with that id, (e.g. `

`)

Because providing an ember-idiomatic way of getting/setting `location.hash` is probably quite a large under taking like query params were, this phase has the router internally strip the hash before passing it along to `router.js` library, since it is not hash-aware yet either.