fixed bug, where multiple codemirrors on a form could still trigger multiple form submission
replaced own event handler registration with CodeMirror's