mirror of
https://github.com/codex-team/editor.js
synced 2024-06-10 09:52:36 +02:00
Fix block tunes being unable to open after tune activation
This commit is contained in:
parent
d7ebf5983a
commit
89601e19e9
|
@ -121,6 +121,7 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
|
|||
scopeElement: this.Editor.API.methods.ui.nodes.redactor,
|
||||
});
|
||||
this.popover.on(PopoverEvent.OverlayClicked, this.onOverlayClicked);
|
||||
this.popover.on(PopoverEvent.Close, () => this.close());
|
||||
|
||||
this.nodes.wrapper.append(this.popover.getElement());
|
||||
|
||||
|
@ -167,6 +168,7 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
|
|||
this.popover.off(PopoverEvent.OverlayClicked, this.onOverlayClicked);
|
||||
this.popover.destroy();
|
||||
this.popover.getElement().remove();
|
||||
this.popover = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,11 @@ export enum PopoverEvent {
|
|||
* When popover overlay is clicked
|
||||
*/
|
||||
OverlayClicked = 'overlay-clicked',
|
||||
|
||||
/**
|
||||
* When popover closes
|
||||
*/
|
||||
Close = 'close'
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -272,6 +277,8 @@ export default class Popover extends EventsDispatcher<PopoverEvent> {
|
|||
confirmationStateItems.forEach((itemEl: HTMLElement) => this.cleanUpConfirmationStateForItem(itemEl));
|
||||
|
||||
this.disableSpecialHoverAndFocusBehavior();
|
||||
|
||||
this.emit(PopoverEvent.Close);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue