mirror of
https://github.com/codex-team/editor.js
synced 2026-03-18 08:29:52 +01:00
feat: improve line selection with Shift + Up/Down
This commit is contained in:
parent
3e33808d14
commit
62d9dba890
3 changed files with 8 additions and 8 deletions
|
|
@ -14,6 +14,8 @@
|
|||
- `Fix` - Fix the memory leak issue in `Shortcuts` class
|
||||
- `Fix` - Fix when / overides selected text outside of the editor
|
||||
- `DX` - Tools submodules removed from the repository
|
||||
- `Improvement` - Shift + Down/Up will allow to select next/previous line instead of Inline Toolbar flipping
|
||||
|
||||
|
||||
### 2.30.7
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ export default class Flipper {
|
|||
*
|
||||
* @param event - keydown event
|
||||
*/
|
||||
private onKeyDown = (event): void => {
|
||||
private onKeyDown = (event: KeyboardEvent): void => {
|
||||
const isReady = this.isEventReadyForHandling(event);
|
||||
|
||||
if (!isReady) {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ describe('Flipper', () => {
|
|||
expect(SomePlugin.pluginInternalKeydownHandler).to.have.not.been.called;
|
||||
});
|
||||
|
||||
it.only('should not flip when shift key is pressed', () => {
|
||||
it('should not flip when shift key is pressed', () => {
|
||||
cy.createEditor({
|
||||
data: {
|
||||
blocks: [
|
||||
|
|
@ -121,13 +121,11 @@ describe('Flipper', () => {
|
|||
.get('.ce-paragraph')
|
||||
.as('paragraph')
|
||||
.selectTextByOffset([0, 10])
|
||||
.wait(200)
|
||||
.type('{shift}{downArrow}');
|
||||
.wait(200);
|
||||
|
||||
// .trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE,
|
||||
// shiftKey: true })
|
||||
// .trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE,
|
||||
// shiftKey: true });
|
||||
cy.get('@paragraph')
|
||||
.trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE,
|
||||
shiftKey: true });
|
||||
|
||||
// eslint-disable-next-line cypress/require-data-selectors
|
||||
cy.get('[data-cy="inline-toolbar"]')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue