RaspberryPiFoundation / editor-ui

Code Editor web component
https://editor-static.raspberrypi.org
Apache License 2.0
37 stars 8 forks source link

Codemirror scrolls to the top when switching between dark and light mode #973

Open loiswells97 opened 3 months ago

loiswells97 commented 3 months ago

When the theme changes, codemirror re-renders and scrolls to the top. One approach could be to capture the scroll position before codemirror re-renders and then programmatically scroll back there once the theme has changed.