mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 23:55:49 +01:00
Close toolbar after block is removed (#314)
This commit is contained in:
parent
7a67d38022
commit
f2ef201a52
3 changed files with 6 additions and 7 deletions
|
|
@ -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
|
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue