diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-05-21 11:22:21 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-05-21 11:22:21 +0200 |
commit | cbcc5f854400f8e22c2164d6265fb863279c9622 (patch) | |
tree | 37ed26513de0992b50e063156dc8bb3fdf1f0b99 | |
parent | 8e40d594a2e53585c2ed06a2c2616fcd24c0eae8 (diff) | |
download | gitlab-ce-cbcc5f854400f8e22c2164d6265fb863279c9622.tar.gz |
Workaround that doesn't add unwanted newline.
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG index fdb37bcc3ab..36fd26baa53 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ v 7.12.0 (unreleased) - Allow to configure location of the `.gitlab_shell_secret` file. (Jakub Jirutka) v 7.11.0 (unreleased) + - 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 b87659d6222..f186fec2a0c 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -313,11 +313,12 @@ class @Notes textarea = form.find("textarea") textarea.focus() - # HACK (rspeicher): Work around a Chrome 43 bug(?). + # 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 add a newline! - textarea.val (_, value) -> - "#{value}\n" + # 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") |