Respect preview visibility preference on AJAX-inserted nodes.
This commit is contained in:
parent
0b22261b97
commit
637f5a7073
1 changed files with 7 additions and 0 deletions
|
|
@ -385,6 +385,13 @@ function insertReply(data, form) {
|
|||
autoGrow(this);
|
||||
});
|
||||
});
|
||||
|
||||
// Respect user's preview visibility preference.
|
||||
if (localStorage.getItem('remarkbox-preview-hidden') === 'true') {
|
||||
newNode.querySelectorAll('.preview-details').forEach(function(details) {
|
||||
details.open = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Wire up AJAX on any new reply forms.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue