marijnh/CodeMirror2 — pull request #714 by bfrohs (2012-08-09 21:22:06+00:00)
Title: Only autofocus editor if another element isn't already focused.

Checks to see if another element already has focus, similar to how the `autofocus` attribute works for plain HTML. You'll notice the two code blocks are nearly identical, but regrettably (at least as far as I can tell), it's impossible to only do this check once, since you don't have access to `textarea` in the main `CodeMirror()` function (so you can't check if it is focused).

As for the IE check/note, I originally found it on line 163 of codemirror.js (in this patch, [line 152 in the current master](https://github.com/marijnh/CodeMirror2/blob/e828092146b5940a7b6a8e5f6ae0399fe6bed6ce/lib/codemirror.js#L152)) and it didn't mention which versions were affected. Also, I don't have access to IE, so I couldn't test. So, you may want to change this to `ie_lt*` accordingly.