Error is thrown in FF4 after ctrl-f5 page reload. Codemirror itself works, but subsequent code is not run. Solution seems to be simple, instead of
if (this.editor.selectionSnapshot) // IE hack
I used
if (this.editor && this.editor.selectionSnapshot) // IE hack
Could it be that you have a timeout running that is trying to focus the editor? I don't think any of the timeouts (which tend to be the things that cause these kinds of errors) set by CodeMirror itself do a focus.
Error is thrown in FF4 after ctrl-f5 page reload. Codemirror itself works, but subsequent code is not run. Solution seems to be simple, instead of if (this.editor.selectionSnapshot) // IE hack
I used if (this.editor && this.editor.selectionSnapshot) // IE hack