From d123c3838cec9dafe2680dfbb6383609492518cc Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Sat, 25 Jul 2015 03:19:12 +0500 Subject: [PATCH] fix of dynamic width for post preview --- js/interface_common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index 7720ef4..49e2b17 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -589,7 +589,8 @@ function posPostPreview(event) { .css('margin-left', textArea.css('margin-left')) .css('margin-right', textArea.css('margin-right')) ; - postPreview.css('width', textArea.css('width') + 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')); } postPreview.html(htmlFormatMsg(textArea[0].value, [])).show();