From b440cb2600c237078ae60d3ae4173b424256a47e Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Sat, 20 Oct 2018 04:43:24 +0500 Subject: [PATCH] fix blur of the current textarea after submit of a twist --- js/interface_common.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/interface_common.js b/js/interface_common.js index 0347659..575716e 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -2514,9 +2514,10 @@ function postSubmit(e, oldLastPostId) { textArea.val('').attr('placeholder', polyglot.t('Your message was sent!')); btnPostSubmit.closest('form').find('.post-area-remaining').text(''); - if (btnPostSubmit.closest('.post-area,.post-reply-content')) { - $('.post-area-new').removeClass('open').find('textarea').blur(); - }; + if (btnPostSubmit.closest('.post-area,.post-reply-content').length) { + btnPostSubmit.closest('.post-area-new').removeClass('open') + .find('textarea').blur(); + } textArea.data('unicodeConversionStack', []); textArea.data('disabledUnicodeRules', []); }