PageUp/Down goes to start/end of document


I’m probably doing something silly, but the code above is almost an exact copy paste of:

The original works fine: CodeMirror Huge Doc Demo

The difference is that your editor is higher than the browser window, whereas the demo one has its own scroll bar. Patch below should help.

Thank you, so it was indeed something silly!