Commit 018602b4 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'fix/notes_reply_click_issue401' into 'master'

Get Reply button as clicked target in notes.js.coffee

See issue #401

This is a small fix to properly find the reply button as the click target when an element inside the button is clicked (e.g. in this case, the ``<i class="icon-comment">`` element in the button, using the jQuery ``.closest(...)`` function.

Previously, the clicked element was assumed to be the button itself, which caused the comment form to spawn within the button when it was clicked (see the issue for screenshots & other details).
parents 1f3261ac 0b1cf500
......@@ -19,6 +19,7 @@ v 7.1.0
- Fix LDAP TLS authentication (Boris HUISGEN)
- Show VERSION information on project sidebar
- Improve branch removal logic when accept MR
- Fix bug where comment form is spawned inside the Reply button
v 7.0.0
- The CPU no longer overheats when you hold down the spacebar
......
......@@ -376,7 +376,7 @@ class Notes
###
replyToDiscussionNote: (e) =>
form = $(".js-new-note-form")
replyLink = $(e.target)
replyLink = $(e.target).closest(".js-discussion-reply-button")
replyLink.hide()
# insert the form after the button
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment