Fix toolbar behaviour (#453)

This commit is contained in:
George Berezhnoy 2018-09-19 12:32:59 +03:00 committed by GitHub
parent 205426470d
commit 854d47ff76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 24 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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();
}

View file

@ -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();
}
}