[Bug] Inline toolbar does not change its position after editing the text #1768 https://github.com/codex-team/editor.js/issues/1768

This commit is contained in:
r.nafikov 2021-08-31 14:14:53 +03:00
parent 65b86c9203
commit cadba911d9
2 changed files with 16 additions and 2 deletions

View file

@ -436,6 +436,11 @@ export default class UI extends Module<UINodes> {
*/
this.Editor.BlockManager.dropPointer();
/**
* Close InlineToolbar
*/
this.Editor.InlineToolbar.close();
/**
* Close Toolbar
*/
@ -446,7 +451,12 @@ export default class UI extends Module<UINodes> {
* @param {KeyboardEvent} event - keyboard event
*/
private backspacePressed(event: KeyboardEvent): void {
const { BlockManager, BlockSelection, Caret } = this.Editor;
const { BlockManager, BlockSelection, Caret, InlineToolbar } = this.Editor;
/**
* Close InlineToolbar
*/
InlineToolbar.close();
/**
* If any block selected and selection doesn't exists on the page (that means no other editable element is focused),

View file

@ -12,7 +12,11 @@
&--showed {
opacity: 1;
visibility: visible;
transform: translateX(-50%)
transform: translateX(-50%);
}
&:not(&--showed) {
top: 0 !important;
}
&--left-oriented {