I made a fiddle to demonstrate that this is not a codemirror bug: http://jsfiddle.net/RUA9h/
In this example, the code editors both behave normally.
That make me realize why the error was occurring. The groupEditor's value is changed when the user selects a group. That is why the error is not happening in the secondary panel, variables, map etc each have their own editor.
Permanent solution would be to have each group have their own editor.
A quick hack fix would be to clear the history whenever a new group is selected.
I made a fiddle to demonstrate that this is not a codemirror bug: http://jsfiddle.net/RUA9h/ In this example, the code editors both behave normally.
That make me realize why the error was occurring. The groupEditor's value is changed when the user selects a group. That is why the error is not happening in the secondary panel, variables, map etc each have their own editor.
Permanent solution would be to have each group have their own editor.
A quick hack fix would be to clear the history whenever a new group is selected.