Don't break the URL in the diff viewer when reloading with an anchor.

Review Request #6913 — Created Feb. 6, 2015 and submitted

Information

Review Board
release-2.0.x
e0aaf19...

Reviewers

When loading the diff viewer with an anchor, the "#" in the URL would be
stripped away, resulting in an incorrect, often broken URL. This was due
to Backbone.history.start() trying to convert it into a
pushState-compatible URL, with the assumption that it was supposed to be
a page in the URL.

We now save the hash, unset it, and then re-set it after
Backbone.history.start().

Navigated to an anchor and reloaded the page. Saw that the URL remained
correct, instead of turning into a broken URL.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (80053bb)
Loading...