mozilla/socorro — pull request #1784 by peterbe (2014-01-11 00:00:04+00:00)
Title: fixes bug 904558 - Current URL not updated when switching between tabs

@ossreleasefeed r?

Yes, I know the code looks complicated but there's an explanation :)

Basically, with [jquery UI tabs](http://api.jqueryui.com/tabs/) you can't connect the `location.hash` to the active tab.
When you do something like `
My Tab
` and click on it, because jquery UI tabs "hijacks" the click it does not change the `location.hash` to say `#mytab`.
Instead, I hook into the `activate` event.

Also, the reason why I use `#tab-bugzilla` and `#tab-reports` is because if you do `location.hash = '#bugzilla'` the browser will scroll to where the `id="bugzilla"` tag is. We can't have that. That's annoying.
By using the `#tab-....` the page does not scroll when you click around and if you refresh the page at any time it will remember which tab you were on.