diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c042a276e..099084831 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -5,6 +5,7 @@ - `Improvements` - A generic type for Tool config added [#1516](https://github.com/codex-team/editor.js/issues/1516) - `Improvements` - Remove unused `force` option in `Caret.navigateNext()` and `Caret.navigatePrevious()` [#857](https://github.com/codex-team/editor.js/issues/857#issuecomment-770363438). - `Improvements` - Remove bundles from the repo [#1541](https://github.com/codex-team/editor.js/pull/1541). +- `Improvements` - Document will be scrolled when blocks are selected with `SHIFT+UP` or `SHIFT+DOWN` [#1447](https://github.com/codex-team/editor.js/issues/1447) - `Fix` - Fix BlockManager.setCurrentBlockByChildNode() with multiple Editor.js instances [#1503](https://github.com/codex-team/editor.js/issues/1503). - `Fix` - Type definition of the Sanitizer config: the sanitize function now contains param definition [#1491](https://github.com/codex-team/editor.js/pull/1491). @@ -19,7 +20,6 @@ - `Fix` - Sanitize pasted block data [#1396](https://github.com/codex-team/editor.js/issues/1396). - `Fix` - Unnecessary block creation after arrow navigation at last non-default block[#1414](https://github.com/codex-team/editor.js/issues/1414) - ### 2.19 - `New` - Read-only mode 🥳 [#837](https://github.com/codex-team/editor.js/issues/837) diff --git a/src/components/modules/crossBlockSelection.ts b/src/components/modules/crossBlockSelection.ts index 2aa648619..76d31c67f 100644 --- a/src/components/modules/crossBlockSelection.ts +++ b/src/components/modules/crossBlockSelection.ts @@ -98,6 +98,10 @@ export default class CrossBlockSelection extends Module { /** close InlineToolbar when Blocks selected */ this.Editor.InlineToolbar.close(); + + nextBlock.holder.scrollIntoView({ + block: 'nearest', + }); } /**