diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 2b3772734..61ffb8b10 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -109,11 +109,13 @@ <% end %> }); + var first_click = true; function check_and_submit(){ if(!check_memo_name()){ return; } - if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() ){ + if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() && first_click){ + first_click = false; memo_content.sync(); $.ajax({ url:'/forums/'+'<%= @forum.id.to_s%>'+'/memos',