When editing longer documents in blank.page, I sometimes find that the scroll position behaves erratically when you press Enter. Since I recently refactored blank.page removing old “scroll fixes”, I knew (for once) that it was unlikely to be my fault.
Here I’m pressing enter on new paragraphs, you will notice the scroll positions the caret on the top of the document.
document.execCommand("insertText", false, "\n");
Here is the editor with the change:
Usually I would not bend backwards to work around the mis-behavior of a browser, but this bug had been on Chrome for so long, and its behavior so important to blank.page, that I thought it would be better to patch things up.