summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi AOKI <federkasten@me.com>2014-07-02 12:37:20 +0900
committerTakashi AOKI <federkasten@me.com>2014-07-02 12:57:30 +0900
commit1057251150159c2db656e5345a3278027bad9840 (patch)
tree96f416d84780fdb55556916130cfc020ffab7563
parent4e1f9e2b8b14eeaabc8f2a779acc8c9d94f538f5 (diff)
downloadgitlab-ce-1057251150159c2db656e5345a3278027bad9840.tar.gz
fix high cpu usage issue that occured in Firefox
fixes issue related with #342 (Merge Request view causes 100% CPU in firefox)
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/markdown_area.js.coffee19
2 files changed, 16 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a5962fdfdc7..dfd95659829 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,7 @@ v 7.1.0
- Add @all mention for comments
- Dont show reply button if user is not signed in
- Expose more information for issues with webhook
+ - Fix cpu usage issue in Firefox
v 7.0.0
- The CPU no longer overheats when you hold down the spacebar
diff --git a/app/assets/javascripts/markdown_area.js.coffee b/app/assets/javascripts/markdown_area.js.coffee
index 516a40b25c2..a3e409b978d 100644
--- a/app/assets/javascripts/markdown_area.js.coffee
+++ b/app/assets/javascripts/markdown_area.js.coffee
@@ -20,6 +20,9 @@ $(document).ready ->
$(".div-dropzone-hover").append iconPicture
$(".div-dropzone").append divSpinner
$(".div-dropzone-spinner").append iconSpinner
+ $(".div-dropzone-spinner").css
+ "opacity": 0
+ "display": "none"
dropzone = $(".div-dropzone").dropzone(
url: project_image_path_upload
@@ -66,13 +69,17 @@ $(document).ready ->
return
sending: ->
- $(".div-dropzone-spinner").css "opacity", 0.7
+ $(".div-dropzone-spinner").css
+ "opacity": 0.7
+ "display": "inherit"
return
complete: ->
$(".dz-preview").remove()
$(".markdown-area").trigger "input"
- $(".div-dropzone-spinner").css "opacity", 0
+ $(".div-dropzone-spinner").css
+ "opacity": 0
+ "display": "none"
return
)
@@ -163,10 +170,14 @@ $(document).ready ->
val + url + "\n"
showSpinner = (e) ->
- $(".div-dropzone-spinner").css "opacity", 0.7
+ $(".div-dropzone-spinner").css
+ "opacity": 0.7
+ "display": "inherit"
closeSpinner = ->
- $(".div-dropzone-spinner").css "opacity", 0
+ $(".div-dropzone-spinner").css
+ "opacity": 0
+ "display": "none"
showError = (message) ->
checkIfMsgExists = $(".error-alert").children().length