It's an offset error that's constant when CodeMirror is finding the height of the cursor (if you find the position of a cursor at the top of the editor [not the top of the page, but right at the edge], it's 36 and not 0.