fix #360 ext/textarea innerHTML bug

This commit is contained in:
nightwing 2013-02-06 22:05:09 +04:00
commit 8ec78bc208

View file

@ -132,11 +132,7 @@ function setupContainer(element, getValue) {
resizeEvent(); resizeEvent();
// Insert the div container after the element. // Insert the div container after the element.
if (element.nextSibling) {
parentNode.insertBefore(container, element.nextSibling); parentNode.insertBefore(container, element.nextSibling);
} else {
parentNode.appendChild(container);
}
// Override the forms onsubmit function. Set the innerHTML and value // Override the forms onsubmit function. Set the innerHTML and value
// of the textarea before submitting. // of the textarea before submitting.
@ -145,7 +141,6 @@ function setupContainer(element, getValue) {
var oldSumit = parentNode.onsubmit; var oldSumit = parentNode.onsubmit;
// Override the onsubmit function of the form. // Override the onsubmit function of the form.
parentNode.onsubmit = function(evt) { parentNode.onsubmit = function(evt) {
element.innerHTML = getValue();
element.value = getValue(); element.value = getValue();
// If there is a onsubmit function already, then call // If there is a onsubmit function already, then call
// it with the current context and pass the event. // it with the current context and pass the event.