fix #360 ext/textarea innerHTML bug
This commit is contained in:
parent
28898c43a0
commit
8ec78bc208
1 changed files with 2 additions and 7 deletions
|
|
@ -73,7 +73,7 @@ function applyStyles(elm, styles) {
|
|||
}
|
||||
|
||||
function setupContainer(element, getValue) {
|
||||
if (element.type != 'textarea') {
|
||||
if (element.type != 'textarea') {
|
||||
throw "Textarea required!";
|
||||
}
|
||||
|
||||
|
|
@ -132,11 +132,7 @@ function setupContainer(element, getValue) {
|
|||
resizeEvent();
|
||||
|
||||
// Insert the div container after the element.
|
||||
if (element.nextSibling) {
|
||||
parentNode.insertBefore(container, element.nextSibling);
|
||||
} else {
|
||||
parentNode.appendChild(container);
|
||||
}
|
||||
parentNode.insertBefore(container, element.nextSibling);
|
||||
|
||||
// Override the forms onsubmit function. Set the innerHTML and value
|
||||
// of the textarea before submitting.
|
||||
|
|
@ -145,7 +141,6 @@ function setupContainer(element, getValue) {
|
|||
var oldSumit = parentNode.onsubmit;
|
||||
// Override the onsubmit function of the form.
|
||||
parentNode.onsubmit = function(evt) {
|
||||
element.innerHTML = getValue();
|
||||
element.value = getValue();
|
||||
// If there is a onsubmit function already, then call
|
||||
// it with the current context and pass the event.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue