This is the original issue https://github.com/codemirror/dev/issues/516 This is the fix to codemirror 6 https://github.com/codemirror/commands/commit/05812d896fcdcbdb22a2bca30ec83988d7373578 Thank you very much.