From b360b7b166a51bf2161e5a051b0ae3d12c7bcba5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 30 Nov 2010 18:03:41 +0100 Subject: [PATCH] Only clear the input field if the reply was posted. --- src/main/resources/static/javascript/sone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 33f45df..69c11e0 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -449,9 +449,9 @@ function ajaxifyPost(postElement) { inputField = $(this.form).find(":input:enabled").get(0); postId = getPostId(this); text = $(inputField).val(); - $(inputField).val(""); postReply(postId, text, function(success, error, replyId) { if (success) { + $(inputField).val(""); loadNewReply(replyId); markPostAsKnown(getPostElement(inputField)); $("#sone .post#" + postId + " .create-reply").addClass("hidden"); -- 2.7.4