codemirror / CodeMirror-v1

An editable-iframe based code editor in JavaScript. See https://github.com/marijnh/CodeMirror for the currently maintained version
http://codemirror.net/
Other
362 stars 63 forks source link

Restore cursor position on refocus (Firefox issue) #28

Closed iliakan closed 13 years ago

iliakan commented 13 years ago

Hello!

I'm creating a tabbed application with CodeMirror. Each tab is a separate editor. When another tab is selected, I call editor.focus() on its editor.

When I switch back, after editor.focus() the cursor becomes positioned on the beginning on the reselected tab. the cursor to keep same position as it was prior to switching.

IE8 works right here, Firefox 3.6 has the problem.

marijnh commented 13 years ago

Hi,

This works for me in both FF 3.6 Windows and FF 3.5 Linux. My test is: open one of the demo pages, put cursor in the middle of editor, click next to it, go to console, do editor.focus(). Please describe how you doing your test, preferably in the demo pages.

Best, Marijn

marijnh commented 13 years ago

Timed out.