prevent modification of codemirror cursor position