summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-05-21 09:31:59 +0000
committerDouwe Maan <douwe@gitlab.com>2015-05-21 11:32:55 +0200
commit4ca7978b85553498aa846bcca0c1736677a77db6 (patch)
treed640b62c818f94829fe8251619559d8f75429785
parent29aae2af576b352979b457588e8344612a5aa616 (diff)
downloadgitlab-ce-4ca7978b85553498aa846bcca0c1736677a77db6.tar.gz
Merge branch 'rs-issue-1568' into 'master'
Work around a Chrome 43 bug preventing note editing Fixes #1568 - and I mean "fixes" I have no idea what causes this or why this fixes it and can't dig into it further right now, but the bug seems like a blocker so this needs to be fixed for 7.11. See merge request !684
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/notes.js.coffee8
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d6efc5c49de..25881867fab 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 7.11.0 (unreleased)
- Fall back to Plaintext when Syntaxhighlighting doesn't work. Fixes some buggy lexers (Hannes Rosenögger)
+ - Get editing comments to work in Chrome 43 again.
- Fix broken view when viewing history of a file that includes a path that used to be another file (Stan Hu)
- Don't show duplicate deploy keys
- Fix commit time being displayed in the wrong timezone in some cases (Hannes Rosenögger)
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index c25b1ddb066..f186fec2a0c 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -312,6 +312,14 @@ class @Notes
form.show()
textarea = form.find("textarea")
textarea.focus()
+
+ # HACK (rspeicher/DouweM): Work around a Chrome 43 bug(?).
+ # The textarea has the correct value, Chrome just won't show it unless we
+ # modify it, so let's clear it and re-set it!
+ value = textarea.val()
+ textarea.val ""
+ textarea.val value
+
disableButtonIfEmptyField textarea, form.find(".js-comment-button")
###