Skip to content

Cursor scrolls to the top in Chrome/Edge when inserting a newline #127

Open
@zewt

Description

@zewt

This seems the same as #72, but it's still happening for me I figured I'd open a new ticket, since that one was a while back and this might be a more specific case (everybody in that ticket seemed happy with the workaround).

It repros with the example at https://codepen.io/WebCoder49/pen/jOypJOx, or with a trivial empty editor. I can reproduce it by:

  • Insert a bunch of lines, I'm testing with 20. For some reason, the actual text seems to matter and just mashing random text doesn't always work. It happens if I insert incrementing numbers on each line, or if each line is "1", but it doesn't always happen if I just mash keys randomly.
  • Scroll the editor so it's in the middle of the text.
  • Click outside the editor to unfocus it, then click a line in the middle of the editor and press enter.

The view scrolls down, pushing the cursor to the top. No idea why it's sensitive to the actual text, but it happens to me in normal use all the time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreA bug/feature for the core code-input.js/code-input.css filesbugSomething isn't workingpriority:highstatus:waitingWaiting for a response/action by the reporter/a third party.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions