diff --git a/CHANGELOG.md b/CHANGELOG.md index d1b6e738..4130a9e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Fixed `source` view supported syntaxes to list modes with no mime - Fixed editor's hint popup positioning when widget is not fit into the page bounds - Added `options` parameter for `loadDataFromUrl()` which is passing as is into `fetch()` as second argument +- Changed `Widget#setContainer()` to append only if container is an instance of `Node` ## 1.0.0-beta.57 (04-03-2021) diff --git a/src/widget/index.js b/src/widget/index.js index 5cfaa080..54c9a74f 100644 --- a/src/widget/index.js +++ b/src/widget/index.js @@ -524,7 +524,11 @@ export default class Widget extends Emitter { } setContainer(container) { - container.append(this.dom.wrapper); + if (container instanceof Node) { + container.append(this.dom.wrapper); + } else { + this.dom.wrapper.remove(); + } } disposeDom() {