feat: improve line selection with Shift + Up/Down

This commit is contained in:
Peter Savchenko 2025-03-08 12:56:03 +03:00
commit 62d9dba890
3 changed files with 8 additions and 8 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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"]')