From 6028a58777524d65dea9571025cc97f8d9df1bf6 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Thu, 20 Aug 2015 09:36:16 +0500 Subject: [PATCH] hide post preview on textarea focus out --- js/interface_common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/interface_common.js b/js/interface_common.js index 5e26403..db46264 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -597,6 +597,7 @@ function posPostPreview(event) { postPreview.width(textArea.width()); postPreview.width(postPreview.width() // width is not accurate if we do it with textArea.width() directly, don't know why - postPreview.css('padding-left') - postPreview.css('padding-right')); + textArea.on('focusout', function () {$(this).siblings('#post-preview').hide();}); } if (textArea[0].value.length) postPreview.html(htmlFormatMsg(textArea[0].value).html).show();