mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-09-02 01:02:21 +00:00
hide post preview on textarea focus out
This commit is contained in:
parent
90d10253ae
commit
6028a58777
@ -597,6 +597,7 @@ function posPostPreview(event) {
|
|||||||
postPreview.width(textArea.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.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.css('padding-left') - postPreview.css('padding-right'));
|
||||||
|
textArea.on('focusout', function () {$(this).siblings('#post-preview').hide();});
|
||||||
}
|
}
|
||||||
if (textArea[0].value.length)
|
if (textArea[0].value.length)
|
||||||
postPreview.html(htmlFormatMsg(textArea[0].value).html).show();
|
postPreview.html(htmlFormatMsg(textArea[0].value).html).show();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user