Commit 83d05ee
Text gets clobbered when assigning to input.defaultValue
https://bugs.webkit.org/show_bug.cgi?id=217156
Patch by Joey Arhar <jarhar@chromium.org> on 2020-11-06
Reviewed by Darin Adler.
This fixes a bug where script assigning to the defaultValue property
of a number or email input causes the text the user entered into the
input to be clobbered when it doesn't perfectly match the sanitized
string returned by the .value property.
Test: LayoutTests/fast/forms/defaultValue-clobbering.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
Canonical link: https://commits.webkit.org/231323@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269528 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent 09e9770 commit 83d05ee
4 files changed
Lines changed: 42 additions & 1 deletion
File tree
- LayoutTests/fast/forms
- Source/WebCore
- html
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
1 | 18 | | |
2 | 19 | | |
3 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
| 767 | + | |
767 | 768 | | |
768 | | - | |
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
| |||
0 commit comments