diff --git a/rhodecode/public/js/src/rhodecode/comments.js b/rhodecode/public/js/src/rhodecode/comments.js index 3e9cf02f..2cb68386 100644 --- a/rhodecode/public/js/src/rhodecode/comments.js +++ b/rhodecode/public/js/src/rhodecode/comments.js @@ -484,14 +484,14 @@ var _submitAjaxPOST = function(url, postData, successHandler, failHandler) { $(this.previewButton).on('click', function(e) { e.preventDefault(); - self.showUploadSection(false); - var text = self.cm.getValue(); if (text === "") { return; } + self.showUploadSection(false); + var postData = { 'text': text, 'renderer': templateContext.visual.default_renderer,