Bug 96035

Summary: Page javascript cannot detect partial input in time input control
Product: WebKit Reporter: Dominic Mazzoni <dmazzoni>
Component: FormsAssignee: Dominic Mazzoni <dmazzoni>
Status: NEW ---    
Severity: Normal CC: abarth, donggwan.kim, keishi, mifenton, tkent, webkit.review.bot, yosin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 88970    
Attachments:
Description Flags
Patch none

Description Dominic Mazzoni 2012-09-06 16:09:12 PDT
The new time input control has the issue that while the user is typing, the page JavaScript is unable to access the partial value. This is different from the old behavior, where a value was returned unless it was invalid.

This will break accessibility on Chrome OS, since accessibility for html form controls is implemented using pure JavaScript APIs.

I propose we add a webkit-prefixed attribute, like webkitRawValue, where you can access whatever the user typed, even if invalid. We can propose this as a W3C standard.
Comment 1 Kent Tamura 2012-09-06 18:37:15 PDT
> I propose we add a webkit-prefixed attribute, like webkitRawValue, where you can access whatever the user typed, even if invalid. We can propose this as a W3C standard.

It might resolve some existing/coming problems.
 - input[type=number] contains invalid strings during editing, but the invalid numbers are not exposed to HTMLInputElement::value.
 - input[type=number] contains localized numbers. But the localized numbers are not exposed via the 'value' property.
 - Ditto for input[type=date].  It can have invalid strings and localized values which doesn't match to the 'value' property.
 - We're going to support IDN in input[type=email]. Editing value will be represented in Unicode like 'tkent@グーグル.com,' but the 'value' property will be 'tkent@xn--qcka1pmc.com'

We need to propose it to WHATWG/W3C, then need to announce to webkit-dev.
Comment 2 Dominic Mazzoni 2012-09-06 22:57:18 PDT
Created attachment 162677 [details]
Patch
Comment 3 Dominic Mazzoni 2012-09-06 23:01:52 PDT
I'm glad there are other potential use cases. It sounds like this is a good idea to propose.

The attached patch is an extremely simple implementation that might be a decent start, once the idea has been proposed. What do you think?