From 40bc510cb76f546199a53da5e318e89e6a2c33d4 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Mon, 19 Dec 2016 10:53:04 -0800 Subject: reset reply context state when URL is removed --- views/new-post.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'views/new-post.php') diff --git a/views/new-post.php b/views/new-post.php index 68460d0..d75d6b4 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -310,6 +310,14 @@ $(function(){ $("#note_in_reply_to").on('change', function(){ var reply_to = $("#note_in_reply_to").val(); + + if(reply_to == "") { + $(".reply-section").addClass("hidden"); + $(".reply-context").addClass("hidden"); + $("#expand-reply").removeClass("hidden"); + return; + } + $(".reply-section .loading").removeClass("hidden"); $.get("/reply/preview", {url:reply_to}, function(data){ -- cgit v1.2.3