X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/e65655594f8007d44515a23867e54eb8321a8ead..1611b0399f2ccfcf5f261642a12076cde91b9600:/resources/js/wysiwyg/ui/framework/toolbars.ts diff --git a/resources/js/wysiwyg/ui/framework/toolbars.ts b/resources/js/wysiwyg/ui/framework/toolbars.ts index b4e49af95..de2255444 100644 --- a/resources/js/wysiwyg/ui/framework/toolbars.ts +++ b/resources/js/wysiwyg/ui/framework/toolbars.ts @@ -34,7 +34,11 @@ export class EditorContextToolbar extends EditorContainerUiElement { dom.hidden = !showing; - if (!showing) { + if (!this.target.isConnected) { + // If our target is no longer in the DOM, tell the manager an update is needed. + this.getContext().manager.triggerFutureStateRefresh(); + return; + } else if (!showing) { return; }