diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-07-15 03:05:50 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-07-19 02:21:36 +0300 |
commit | 4d302859a2504689318c409a82844b046b61b08c (patch) | |
tree | 8922646a260f7383daf6be876812270e6c1b6328 /app/assets/javascripts | |
parent | 159135291af0066b6c1fdbae04e2f05a785986aa (diff) |
Off mouse listener from document for diff comment button.
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/files_comment_button.js.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/files_comment_button.js.coffee b/app/assets/javascripts/files_comment_button.js.coffee index 63d453fa411..5ab82c39fcd 100644 --- a/app/assets/javascripts/files_comment_button.js.coffee +++ b/app/assets/javascripts/files_comment_button.js.coffee @@ -17,6 +17,8 @@ class @FilesCommentButton debounce = _.debounce @render, DEBOUNCE_TIMEOUT_DURATION $(document) + .off 'mouseover', LINE_COLUMN_CLASSES + .off 'mouseleave', LINE_COLUMN_CLASSES .on 'mouseover', LINE_COLUMN_CLASSES, debounce .on 'mouseleave', LINE_COLUMN_CLASSES, @destroy @@ -64,7 +66,7 @@ class @FilesCommentButton return hoveredElement if hoveredElement.hasClass LINE_CONTENT_CLASS if @VIEW_TYPE is 'inline' - return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" + return $(hoveredElement).closest(LINE_HOLDER_CLASS).find ".#{LINE_CONTENT_CLASS}" else return $(hoveredElement).next ".#{LINE_CONTENT_CLASS}" |