summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-03-14 00:02:30 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-03-28 11:09:12 -0500
commitcf3c43980d3911e32d767158420400d75edf3968 (patch)
tree18741697d64bf26a98e8e15b005062ecb4b454ed /app/views
parent6460489babe3cd25358800804f6befc1bd242f22 (diff)
downloadgitlab-ce-cf3c43980d3911e32d767158420400d75edf3968.tar.gz
Fix link togglers jumping to top
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/29414
Diffstat (limited to 'app/views')
-rw-r--r--app/views/discussions/_discussion.html.haml2
-rw-r--r--app/views/projects/commits/_commit.html.haml2
-rw-r--r--app/views/projects/diffs/_stats.html.haml2
-rw-r--r--app/views/projects/merge_requests/widget/open/_accept.html.haml2
-rw-r--r--app/views/projects/new.html.haml2
5 files changed, 5 insertions, 5 deletions
diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml
index 6f5d4bf2a2f..2d78c55211e 100644
--- a/app/views/discussions/_discussion.html.haml
+++ b/app/views/discussions/_discussion.html.haml
@@ -8,7 +8,7 @@
.discussion.js-toggle-container{ class: discussion.id, data: { discussion_id: discussion.id } }
.discussion-header
.discussion-actions
- = link_to "#", class: "note-action-button discussion-toggle-button js-toggle-button" do
+ %button.note-action-button.discussion-toggle-button.js-toggle-button{ type: "button" }
- if expanded
= icon("chevron-up")
- else
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index 6ab9a80e083..4b1ff75541a 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -24,7 +24,7 @@
.visible-xs-inline
= render_commit_status(commit, ref: ref)
- if commit.description?
- %a.text-expander.hidden-xs.js-toggle-button ...
+ %button.text-expander.hidden-xs.js-toggle-button{ type: "button" } ...
- if commit.description?
%pre.commit-row-description.js-toggle-content
diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml
index 8e24e28765f..fd4f3c8d3cc 100644
--- a/app/views/projects/diffs/_stats.html.haml
+++ b/app/views/projects/diffs/_stats.html.haml
@@ -1,7 +1,7 @@
.js-toggle-container
.commit-stat-summary
Showing
- = link_to '#', class: 'js-toggle-button' do
+ %button.diff-stats-summary-toggler.js-toggle-button{ type: "button" }
%strong= pluralize(diff_files.size, "changed file")
with
%strong.cgreen #{diff_files.sum(&:added_lines)} additions
diff --git a/app/views/projects/merge_requests/widget/open/_accept.html.haml b/app/views/projects/merge_requests/widget/open/_accept.html.haml
index c94c7944c0b..e5ec151a61d 100644
--- a/app/views/projects/merge_requests/widget/open/_accept.html.haml
+++ b/app/views/projects/merge_requests/widget/open/_accept.html.haml
@@ -37,7 +37,7 @@
= check_box_tag :should_remove_source_branch
Remove source branch
.accept-control
- = link_to "#", class: "modify-merge-commit-link js-toggle-button" do
+ %button.modify-merge-commit-link.js-toggle-button{ type: "button" }
= icon('edit')
Modify commit message
.js-toggle-content.hide.prepend-top-default
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 34a1214a350..09ac1fd6794 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -76,7 +76,7 @@
Gitea
%div
- if git_import_enabled?
- = link_to "#", class: 'btn js-toggle-button import_git' do
+ %button.btn.js-toggle-button.import_git{ type: "button" }
= icon('git', text: 'Repo by URL')
.import_gitlab_project
- if gitlab_project_import_enabled?