codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.94k stars 377 forks source link

Setting `EditorState.readOnly.of(true)` does not work anymore in Chrome since `v6.28.0` (EditContext API issue?) #1411

Closed josdejong closed 4 months ago

josdejong commented 4 months ago

Describe the issue

Since @codemirror/view@6.28.0, setting EditorState.readOnly.of(true) does not work anymore on Chrome. The latest working version is 6.27.0.

This maybe a similar to #1393.

Browser and platform

Chrome

Reproduction link

https://stackblitz.com/edit/vitejs-vite-ymmekk?file=main.js&terminal=dev

marijnh commented 4 months ago

Thanks for spotting that. Attached patch should help.

josdejong commented 3 months ago

Thanks! Marijn. I can confirm the issue is fixed now.