[Webkit-unassigned] [Bug 217156] New: Text gets clobbered when assigning to input.defaultValue

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 30 17:18:56 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=217156

            Bug ID: 217156
           Summary: Text gets clobbered when assigning to
                    input.defaultValue
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jarhar at chromium.org

When script assigns to the defaultValue property of a number or email input, it may cause text which the user entered into the input to be removed.
In both input types, leading and trailing whitespace gets removed.
In number inputs, trailing '.' and 'e' characters also get removed.

This causes bugs in React where text is changed while the user is typing since React assigns to the defaultValue property:
https://github.com/facebook/react/issues/14551
https://github.com/facebook/react/issues/15418
https://github.com/facebook/react/issues/14168
https://github.com/facebook/react/issues/14356

The relationship between those react issues and this bug is discussed more here: 
https://github.com/whatwg/html/issues/5257#issuecomment-607548564

This has already been fixed in chrome and is now in the stable release: http://crrev.com/777263

This bug is tested by this WPT: https://wpt.fyi/results/html/semantics/forms/the-input-element/defaultValue-clobbering.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201001/ae2356c0/attachment-0001.htm>


More information about the webkit-unassigned mailing list