Focus oddities

Hi,
Here’s a weird and quite annoying thing while focusing a CodeMirror widget:

  • On the CodeMirror site, resize your browser to get a CodeMirror widget displaying its content beyond the bottom of the browser and have a page scrollbar.
  • Reload the page to ensure nothing occured other than thewidget initialization.
  • Scroll the page and click into the widget area as if you want to edit the content

=> The cursor is activated where you clicked in the text (as expected), but the page is suddenly scrolled back, leaving you in the wild, forcing you to get it back by scrolling the page yourself and/or replacing the cursor

Mind telling me which browser you are using? It doesn’t happen for me on Chrome.

Oops, I forgot to tell that I’m having this issue with Firefox on Win32 (latest stable).

Right, I can reproduce the problem there. This patch should help.