Skip to content

Commit c1d7744

Browse files
[Fix] Stop jumping to block start on toolbox close (#2055)
* Stop jumping to block start when on toolbox close * Update changelog and version * Set caret on esc press * Update package.json Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
1 parent 8fec2e7 commit c1d7744

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 2.24.4
4+
5+
- `Fix` — Keyboard selection by word [2045](https://github.com/codex-team/editor.js/issues/2045)
6+
37
### 2.24.3
48

59
- `Fix` — Issue with toolbox preventing text selection fixed

src/components/modules/toolbar/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ export default class Toolbar extends Module<ToolbarNodes> {
167167
opened: this.toolboxInstance.opened,
168168
close: (): void => {
169169
this.toolboxInstance.close();
170-
this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);
171170
},
172171
open: (): void => {
173172
/**

src/components/modules/ui.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ export default class UI extends Module<UINodes> {
544544

545545
if (this.Editor.Toolbar.toolbox.opened) {
546546
this.Editor.Toolbar.toolbox.close();
547+
this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock);
547548
} else if (this.Editor.BlockSettings.opened) {
548549
this.Editor.BlockSettings.close();
549550
} else if (this.Editor.ConversionToolbar.opened) {

0 commit comments

Comments
 (0)