From e0fc657d2a9922e71e1b41f728ec7243af73cebc Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 31 Oct 2013 22:44:39 +0000
Subject: [PATCH] Await draft deletion before refreshing the page

If the [reset] button refreshes the page, ensure the draft deletion is
completed before the refresh is performed or the draft deletion will be
canceled.
---
 js/redactor-osticket.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js
index 486cadd72..81e23bea4 100644
--- a/js/redactor-osticket.js
+++ b/js/redactor-osticket.js
@@ -98,6 +98,7 @@ RedactorPlugins.draft = {
         var self = this;
         $.ajax('ajax.php/draft/'+this.draft_id, {
             type: 'delete',
+            async: false,
             success: function() {
                 self.opts.autosave = '';
                 self.opts.imageUpload = '';
-- 
GitLab