Merge pull request #2002 from umputun/fix/placeholder-clearing-1990
Clear user placeholder content when comments iframe loads
This commit is contained in:
@@ -79,6 +79,11 @@ function createInstance(config: typeof window.remark_config) {
|
||||
}
|
||||
|
||||
if (data.inited === true) {
|
||||
// remove placeholder content added by the user before comments loaded
|
||||
Array.from(root!.childNodes)
|
||||
.filter((node) => node !== iframe)
|
||||
.forEach((node) => node.remove());
|
||||
|
||||
postHashToIframe();
|
||||
postTitleToIframe(document.title);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user