Fix link togglers jumping to top
What does this MR do?
-
e.preventDefault()
only fora
andbutton
. We want the checkbox to do its own thing.
Using <button>
is semantically more accurate for the usage and we don't need the previous e.preventDefault()
Are there points in the code the reviewer needs to double check?
Togglers to check:
- "Create a Mattermost team for this group" checkbox, http://localhost:3000/groups/new (enable
mattermost
inconfig/gitlab.yml
) - "Repo by Url" button, http://localhost:3000/projects/new
- In MR widget "Modify commit message", http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/3
- Discussion "Toggle discussion", http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/3
- "Showing 1 changed file with 4 additions and 7 deletions" , http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/3/diffs
- Commit description toggle "...", http://localhost:3000/gitlab-org/gitlab-ce/commits/master
Why was this MR needed?
- We used
a
tags with empty fragmenthref="#"
which would jump you to the top of the page when clicked
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added - Tests
-
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #29414 (closed)