Skip to content

Commit 62d9dba

Browse files
committed
feat: improve line selection with Shift + Up/Down
1 parent 3e33808 commit 62d9dba

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
- `Fix` - Fix the memory leak issue in `Shortcuts` class
1515
- `Fix` - Fix when / overides selected text outside of the editor
1616
- `DX` - Tools submodules removed from the repository
17+
- `Improvement` - Shift + Down/Up will allow to select next/previous line instead of Inline Toolbar flipping
18+
1719

1820
### 2.30.7
1921

src/components/flipper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export default class Flipper {
199199
*
200200
* @param event - keydown event
201201
*/
202-
private onKeyDown = (event): void => {
202+
private onKeyDown = (event: KeyboardEvent): void => {
203203
const isReady = this.isEventReadyForHandling(event);
204204

205205
if (!isReady) {

test/cypress/tests/utils/flipper.cy.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ describe('Flipper', () => {
102102
expect(SomePlugin.pluginInternalKeydownHandler).to.have.not.been.called;
103103
});
104104

105-
it.only('should not flip when shift key is pressed', () => {
105+
it('should not flip when shift key is pressed', () => {
106106
cy.createEditor({
107107
data: {
108108
blocks: [
@@ -121,13 +121,11 @@ describe('Flipper', () => {
121121
.get('.ce-paragraph')
122122
.as('paragraph')
123123
.selectTextByOffset([0, 10])
124-
.wait(200)
125-
.type('{shift}{downArrow}');
124+
.wait(200);
126125

127-
// .trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE,
128-
// shiftKey: true })
129-
// .trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE,
130-
// shiftKey: true });
126+
cy.get('@paragraph')
127+
.trigger('keydown', { keyCode: ARROW_DOWN_KEY_CODE,
128+
shiftKey: true });
131129

132130
// eslint-disable-next-line cypress/require-data-selectors
133131
cy.get('[data-cy="inline-toolbar"]')

0 commit comments

Comments
 (0)