Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-02-23 04:27:06 +0300
committerEric Eastwood <contact@ericeastwood.com>2017-03-13 19:58:59 +0300
commitc0242485393fe93397ee18889bc5345b67d5ea0d (patch)
tree0624b5935c916ba89360c3ef8e3acc54b88feb78 /app/assets/javascripts/line_highlighter.js
parent1d4b11f3388ddd7cf0076f95ac26196f6949dc0b (diff)
Update permalink/blame buttons with line number fragment hash
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.js12
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) {