mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Lexical: Added a media toolbar, improved toolbars and media selection
- Updated toolbars to auto-refresh ui if it attempts to update targeting a DOM element which no longer exists. - Removed MediaNode dom specific click handling which was causing selection issues, and did not seem to be needed now.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user