-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround bindings to textarea.placeholder in IE
Textareas have a very weird bug in IE, where the text of the placeholder is copied to the content of the textarea when set. This a creates two bugs: 1. An unintended binding is made to the textContent of the textarea's text child node, meaning updates to the `placeholder` will be an unnecessary binding process in the best case, or an exception thrown when updating the text child node in the worst case. 2. When `legacyOptimizations` is enabled, the child node of the text area is removed when the binding for `placeholder` is processed and removed, leaving a binding to a `null` node, and throwing exceptions. Therefore, when we detect this placeholder behavior, we will remove the textnode before template processing, preventing both bugs.
- Loading branch information
Showing
2 changed files
with
83 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