-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Fix setting
value
not working server-side on <textarea>
elements
- Loading branch information
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,7 +186,7 @@ Element.setProperty(function tabIndex() { | |
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.3.0 | ||
* @version 1.3.1 | ||
* @version 2.3.16 | ||
* | ||
* @type {String} | ||
*/ | ||
|
@@ -208,8 +208,14 @@ Element.setProperty(function value() { | |
return this[VALUE]; | ||
}, function setValue(value) { | ||
|
||
// Setting the value of a textarea breaks the bond between the innerHTML | ||
if (this.tagName != 'TEXTAREA') { | ||
if (this.tagName == 'TEXTAREA') { | ||
|
||
if (value === null) { | ||
value = ''; | ||
} | ||
|
||
this.textContent = value; | ||
} else { | ||
if (HAS_VALUE[this.tagName]) { | ||
return this.setAttribute('value', value); | ||
} | ||
|