WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
220430
autocapitalize does not work correctly after clearing input value
https://bugs.webkit.org/show_bug.cgi?id=220430
Summary
autocapitalize does not work correctly after clearing input value
Liam DeBeasi
Reported
2021-01-07 12:25:44 PST
Created
attachment 417199
[details]
Code Reproduction When clearing an input programmatically, the autocapitalize attribute no longer works as expected. Steps to reproduce: 1. Open attached code reproduction on an iOS device. 2. Type "test" into the input. It should be rendered as "Test" because autocapitalize is enabled. 3. Tap the "Clear Input" button. The value of the input should be set to the empty string, and the input should remain focused. 4. Type "test" into the input. It should be rendered as "test" this time. If you have predictive text enabled on your iOS device, you should notice that the first suggestion on the left is "Testtest". This leads me to believe that iOS is not updating some internal state for the input when programmatically clearing. Expected Behavior: After clearing the input the first time, I would expect that typing "test" would get rendered out as "Test" due to the autocapitalize attribute. Actual Behavior: Typing "test" is rendered out as "test". Other info: * I can reproduce this on iOS 13 and iOS 14. * This works as expected on Chrome for Android. * A common use case for this is when users want to clear an input without closing the keyboard. In the example I attached, the clear button has a "touchstart" listener that a) clears the input value and b) calls event.preventDefault so the keyboard does not get closed.
Attachments
Code Reproduction
(680 bytes, text/html)
2021-01-07 12:25 PST
,
Liam DeBeasi
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-01-14 12:26:13 PST
<
rdar://problem/73211903
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug