This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25473 - [Custom]: Add support for focus navigation similar to input type=date
Summary: [Custom]: Add support for focus navigation similar to input type=date
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Takayoshi Kochi
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2014-04-26 00:04 UTC by Steve Orvell
Modified: 2015-07-06 08:18 UTC (History)
5 users (show)

See Also:


Attachments

Description Steve Orvell 2014-04-26 00:04:43 UTC
See the following example (in Chrome):

http://jsbin.com/wiqutiku/1/quiet

Imagine if <input type="date"> element was implemented as a custom element. The author would need to create the custom focus behavior this element has.

Special behavior occurs when focus enters and leaves the element. When focus enters the element in the forward navigation direction, the element needs to focus the month field. When the focus enters the element in the backward direction, the element needs to focus the year field. When the focus leaves the month field in the backwards direction, the element needs to shift focus from itself to the previous element in the focus flow. When the focus leaves the year field in the forward direction, the element can simply let the focus naturally flow to the next element.

Here's a strawman for one way this could work:

 - add willFocusCallback and willBlurCallback custom element callbacks and provide the focus navigation direction and currently focused element as arguments.
 - add a way to tell the platform to focus the 'next' or 'previous' element in the focus flow.
Comment 1 Takayoshi Kochi 2015-02-18 07:59:23 UTC
This is in progress in Blink implementation - design doc at
https://docs.google.com/a/chromium.org/document/d/1k93Ez6yNSyWQDtGjdJJqTBPmljk9l2WS3JTe5OHHB50/edit
Comment 2 Hayato Ito 2015-07-06 08:18:07 UTC
Moved to https://github.com/w3c/webcomponents/issues/150