Permalink
Browse files

fix toTextArea

  • Loading branch information...
marijnh committed Feb 13, 2011
1 parent 80d45c2 commit f47c50d5061260597a81acc4137bb5e5457c1241
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/codemirror.js
View
@@ -1524,7 +1524,7 @@ var CodeMirror = (function() {
function save() {textarea.value = instance.getValue();}
if (textarea.form) {
- var rmSubmit = connect(textarea.form, "submit", save);
+ var rmSubmit = connect(textarea.form, "submit", save, true);
var realSubmit = textarea.form.submit;
function wrappedSubmit() {
updateField();
@@ -1542,7 +1542,7 @@ var CodeMirror = (function() {
instance.save = save;
instance.toTextArea = function() {
save();
- textarea.parentNode.removeChild(instance.div);
+ textarea.parentNode.removeChild(instance.getWrapperElement());
textarea.style.display = "";
if (textarea.form) {
textarea.form.submit = realSubmit;

0 comments on commit f47c50d

Please sign in to comment.