diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-07-15 02:15:32 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-07-15 02:15:32 +0300 |
commit | 901b54d9351bda2e6982321d99dba95b36870a8c (patch) | |
tree | b471cfc307b4f5be089f60fb353fab489b7af77d | |
parent | fadb393a4a5e893e4dcaf9cf01a2a663892d3369 (diff) | |
download | gitlab-ce-901b54d9351bda2e6982321d99dba95b36870a8c.tar.gz |
Fix inline view for comment button selector.
-rw-r--r-- | app/assets/javascripts/files_comment_button.js.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/files_comment_button.js.coffee b/app/assets/javascripts/files_comment_button.js.coffee index 2b9dc6419d5..63d453fa411 100644 --- a/app/assets/javascripts/files_comment_button.js.coffee +++ b/app/assets/javascripts/files_comment_button.js.coffee @@ -63,7 +63,10 @@ class @FilesCommentButton getLineContent: (hoveredElement) -> return hoveredElement if hoveredElement.hasClass LINE_CONTENT_CLASS - $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" + if @VIEW_TYPE is 'inline' + return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" + else + return $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" getButtonParent: (hoveredElement) -> if @VIEW_TYPE is 'inline' |