Bug 96035 - Page javascript cannot detect partial input in time input control
Summary: Page javascript cannot detect partial input in time input control
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dominic Mazzoni
URL:
Keywords:
Depends on:
Blocks: 88970
  Show dependency treegraph
 
Reported: 2012-09-06 16:09 PDT by Dominic Mazzoni
Modified: 2017-07-18 08:30 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.39 KB, patch)
2012-09-06 22:57 PDT, Dominic Mazzoni
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?