Details
-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
-
None
Description
Steps to reproduce
- Add condition to render editable-page like this:
<editable-page *ngIf="content" [content]="content"></editable-page> - The app will stop working
.. Logs, screenshots, gifs...
Expected results
The app should work
Actual results
The console shows errors, and no green bars.
Workaround
Development notes
When the content is set to the editable-page, editable-page tries to set values to its children, but the editable-page's children are not ready yet.
Wrap the logic to setTimeout method may help fix this issue or try to check the commentComponent until it's ready.
@Input() set content(content: object) {
setTimeout(() => { // a delay to make sure editable-page's children are rendered
if (content && this.editorContext.inIframe()) {
this.updateComment(content);
this.editorContext.onFrameReady();
this.editorContext.refresh();
}
}, 0);
}
Checklists
Acceptance criteria