Skip to content

bug(rich-text) down-arrow in code block exits the code block even when more lines in the code block below cursor #191

@yellis

Description

@yellis

Describe the bug
Pressing the down arrow key in a code blocks with multiple lines moves out of the code block, instead of down to the next line in the code block.

To Reproduce

  1. RT mode
  2. Add text with multiple lines, make into code block
  3. Cursor on the top line
  4. Down arrow on keyboard
  5. Observe: cursor skips remaining lines in the code block, exits code block

Expected behavior
If additional lines below cursor in the code block, down arrow should move to next line. Down arrow should only exit code block when cursor is on the last line in the code block.

Screenshots
demo

In demo, user pressed: down up up

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmode - rich textAffects the editor's rich text (wysiwyg) mode

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions