window.focus() within onMouseDown

Hi. I’m new in CodeMirror, but i stuck with some behavior of it.

When method onMouseDown called within codemirror (line 3581 for version 5.10.1), that everytime calls method window.focus(). But when it calls, then my grid editor (extJS) closes.
There is no way for ignore this line. If i will use e.codemirrorIgnore (mousedown event), then i will unable to get default behavior of editor.

Could someone help me with it?

Is the grid editor in the same frame? If so, I don’t know of any way it would even be able to detect the call to window.focus(). If it’s in a different frame, yes, focusing the editor will unfocus that frame, there’s not much we can do about it.

(Or, if it’s doing something horrible like overriding window.focus, well, I suggest you take that up with the library maintainers.)