diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-02-22 19:27:06 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-03-13 11:58:59 -0500 |
commit | c0242485393fe93397ee18889bc5345b67d5ea0d (patch) | |
tree | 0624b5935c916ba89360c3ef8e3acc54b88feb78 /app/assets/javascripts/line_highlighter.js | |
parent | 1d4b11f3388ddd7cf0076f95ac26196f6949dc0b (diff) | |
download | gitlab-ce-c0242485393fe93397ee18889bc5345b67d5ea0d.tar.gz |
Update permalink/blame buttons with line number fragment hash19742-permalink-blame-button-line-number-hash-links
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/19742
Diffstat (limited to 'app/assets/javascripts/line_highlighter.js')
-rw-r--r-- | app/assets/javascripts/line_highlighter.js | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/app/assets/javascripts/line_highlighter.js b/app/assets/javascripts/line_highlighter.js index 966fcd8ec47..1821ca18053 100644 --- a/app/assets/javascripts/line_highlighter.js +++ b/app/assets/javascripts/line_highlighter.js @@ -67,17 +67,7 @@ require('vendor/jquery.scrollTo'); } LineHighlighter.prototype.bindEvents = function() { - $('#blob-content-holder').on('mousedown', 'a[data-line-number]', this.clickHandler); - // While it may seem odd to bind to the mousedown event and then throw away - // the click event, there is a method to our madness. - // - // If not done this way, the line number anchor will sometimes keep its - // active state even when the event is cancelled, resulting in an ugly border - // around the link and/or a persisted underline text decoration. - $('#blob-content-holder').on('click', 'a[data-line-number]', function(event) { - event.preventDefault(); - event.stopPropagation(); - }); + $('#blob-content-holder').on('click', 'a[data-line-number]', this.clickHandler); }; LineHighlighter.prototype.clickHandler = function(event) { |