Skip to content
Snippets Groups Projects

After highlighting, update url of file action buttons.

Closed username-removed-1243277 requested to merge (removed):issue-19742 into master

What does this MR do?

I have fixed operating logic of file action buttons.

Are there points in the code the reviewer needs to double check?

I don't think so.

Why was this MR needed?

After highlighting, when I push permalink or blame button, my highlights disappear. It was kind of unnerving.

What are the relevant issue numbers?

Fixes #19742 (closed)

Screenshots (if relevant)

I will upload a video which is about how it works.

Does this MR meet the acceptance criteria?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
146 148 # We're using pushState instead of assigning location.hash directly to
147 149 # prevent the page from scrolling on the hashchange event
148 150 history.pushState({turbolinks: false, url: value}, document.title, value)
151
152 @__updateFileActionButtons__(value)
153
154 # After highlighting, update url of file action buttons.
155 __updateFileActionButtons__: (hash) ->
  • I'm not sure this belongs in this file, but if we decide it does, it should have tests, since this is one of the few JavaScript classes that actually has unit tests.

  • 146 148 # We're using pushState instead of assigning location.hash directly to
    147 149 # prevent the page from scrolling on the hashchange event
    148 150 history.pushState({turbolinks: false, url: value}, document.title, value)
    151
    152 @__updateFileActionButtons__(value)
    153
    154 # After highlighting, update url of file action buttons.
    155 __updateFileActionButtons__: (hash) ->
    156 $buttons = $('.js-followed-buttons')
  • username-removed-1243277 Status changed to closed

    Status changed to closed

  • Please register or sign in to reply
    Loading