mirror of
https://github.com/codex-team/editor.js
synced 2024-06-08 08:52:15 +02:00
Fix toolbar behaviour (#453)
This commit is contained in:
parent
205426470d
commit
854d47ff76
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -111,6 +111,7 @@ export default class BlockEvents extends Module {
|
|||
this.Editor.Toolbox.open();
|
||||
} else if (currentBlock.isEmpty) {
|
||||
this.Editor.Toolbar.open();
|
||||
this.Editor.Toolbar.plusButton.show();
|
||||
this.Editor.Toolbox.open();
|
||||
}
|
||||
|
||||
|
|
|
@ -296,9 +296,9 @@ export default class UI extends Module {
|
|||
event.stopPropagation();
|
||||
|
||||
/**
|
||||
* Move toolbar and open
|
||||
* Close toolbar
|
||||
*/
|
||||
this.Editor.Toolbar.open();
|
||||
this.Editor.Toolbar.close();
|
||||
|
||||
/**
|
||||
* Hide the Plus Button
|
||||
|
@ -318,6 +318,7 @@ export default class UI extends Module {
|
|||
isEmptyBlock = this.Editor.BlockManager.currentBlock.isEmpty;
|
||||
|
||||
if (isInitialBlock && isEmptyBlock) {
|
||||
this.Editor.Toolbar.open();
|
||||
this.Editor.Toolbar.plusButton.show();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue