Skip to content

Scroll position not updated when editor size change #6819

@lishid

Description

@lishid

Steps to repro

  • Go to https://codemirror.net/
  • Run console code editor.setValue(new Array(100).fill('test').join('\n'));
  • Scroll editor down.
  • Run console code editor.setValue('test');
  • Run console code editor.setValue(new Array(100).fill('test').join('\n'));

Expected results

Editor fully scrolled to the top

Observed results

Scroll bar shows editor scrolled to the bottom, while text seems to be scrolled to the top.

Notes

Could be a recent regression

Screencap

test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions