Permalink button drops the `#LXX` URL parameter
Summary
When viewing a file, clicking the "Permalink" button will cause any previously-selected line reference (e.g. #L32) to be dropped from the URL.
Steps to reproduce
- Navigate to a file view, i.e. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/shared/milestones/_sidebar.html.haml
- Select a specific line by clicking on a line number. Notice that a URL parameter like
#LXXhas been appended to the current URL in your browser's address bar. - Click the "Permalink" button
What is the current bug behavior?
The new URL no longer includes the #LXX parameter.
What is the expected correct behavior?
The new URL should still contain the #LXX parameter that existed before the "Permalink" button was clicked.
Output of checks
This bug happens on GitLab.com.