summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-11-16 09:08:15 +0000
committerTiago <tiagonbotelho@hotmail.com>2017-11-16 10:20:05 +0000
commit62f3f9ef368e15e14a509dbd7612910c249bae80 (patch)
treea642a09336027906dd6666341af01005270da2f9
parent209ed43a0cc9fde2f5268537438f9e39136ac787 (diff)
downloadgitlab-ce-62f3f9ef368e15e14a509dbd7612910c249bae80.tar.gz
Merge branch '40198-fix-gpg-badge-links' into 'master'
Resolve "Clicking on GPG verification badge jumps to top of the page" Closes #40198 See merge request gitlab-org/gitlab-ce!15407 (cherry picked from commit 3ba84d4ba5953f5cf603fbf7e0e2d2bcf03f93eb) d75b3380 fix issue where clicking GPG verification badge would cause page to scroll to top 4a5046c4 add CHANGELOG.md entry for !15407
-rw-r--r--app/views/projects/commit/_ajax_signature.html.haml2
-rw-r--r--app/views/projects/commit/_signature_badge.html.haml2
-rw-r--r--changelogs/unreleased/40198-fix-gpg-badge-links.yml6
3 files changed, 8 insertions, 2 deletions
diff --git a/app/views/projects/commit/_ajax_signature.html.haml b/app/views/projects/commit/_ajax_signature.html.haml
index 1d6a0fa38ca..36b28c731a1 100644
--- a/app/views/projects/commit/_ajax_signature.html.haml
+++ b/app/views/projects/commit/_ajax_signature.html.haml
@@ -1,2 +1,2 @@
- if commit.has_signature?
- %a{ href: '#', tabindex: 0, class: commit_signature_badge_classes('js-loading-gpg-badge'), data: { toggle: 'tooltip', placement: 'auto top', title: 'GPG signature (loading...)', 'commit-sha' => commit.sha } }
+ %a{ href: 'javascript:void(0)', tabindex: 0, class: commit_signature_badge_classes('js-loading-gpg-badge'), data: { toggle: 'tooltip', placement: 'auto top', title: 'GPG signature (loading...)', 'commit-sha' => commit.sha } }
diff --git a/app/views/projects/commit/_signature_badge.html.haml b/app/views/projects/commit/_signature_badge.html.haml
index b6b7aae6f9a..44aa8002f12 100644
--- a/app/views/projects/commit/_signature_badge.html.haml
+++ b/app/views/projects/commit/_signature_badge.html.haml
@@ -24,5 +24,5 @@
= link_to('Learn more about signing commits', help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gpg-popover-help-link')
-%a{ href: '#', tabindex: 0, class: css_classes, data: { toggle: 'popover', html: 'true', placement: 'auto top', title: title, content: content } }
+%a{ href: 'javascript:void(0)', tabindex: 0, class: css_classes, data: { toggle: 'popover', html: 'true', placement: 'auto top', title: title, content: content } }
= label
diff --git a/changelogs/unreleased/40198-fix-gpg-badge-links.yml b/changelogs/unreleased/40198-fix-gpg-badge-links.yml
new file mode 100644
index 00000000000..62b962acefa
--- /dev/null
+++ b/changelogs/unreleased/40198-fix-gpg-badge-links.yml
@@ -0,0 +1,6 @@
+---
+title: Fix issue where clicking a GPG verification badge would scroll to the top of
+ the page
+merge_request: 15407
+author:
+type: fixed