Close toolbar after block is removed (#314)

This commit is contained in:
Murod Khaydarov 2018-07-19 17:38:09 +03:00 committed by GitHub
commit f2ef201a52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View file

@ -2691,10 +2691,9 @@ var BlocksAPI = function (_Module) {
if (this.Editor.BlockManager.currentBlockIndex === 0) {
this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);
} else {
if (this.Editor.Caret.navigatePrevious(true)) {
this.Editor.Toolbar.close();
}
this.Editor.Caret.navigatePrevious(true);
}
this.Editor.Toolbar.close();
}
/**
* Clear Editor's area

File diff suppressed because one or more lines are too long

View file

@ -95,10 +95,10 @@ export default class BlocksAPI extends Module implements IBlocksAPI {
if (this.Editor.BlockManager.currentBlockIndex === 0) {
this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);
} else {
if (this.Editor.Caret.navigatePrevious(true)) {
this.Editor.Toolbar.close();
}
this.Editor.Caret.navigatePrevious(true)
}
this.Editor.Toolbar.close();
}
/**