Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Custom]: Add support for focus navigation similar to input type=date (bugzilla: 25473) #150

Closed
hayatoito opened this issue Jul 6, 2015 · 1 comment

Comments

@hayatoito
Copy link
Contributor

Title: [Custom]: Add support for focus navigation similar to input type=date (bugzilla: 25473)

Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25473


comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25473#c0
Steve Orvell wrote on 2014-04-26 00:04:43 +0000.

See the following example (in Chrome):

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

Imagine if 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
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25473#c1
Takayoshi Kochi wrote on 2015-02-18 07:59:23 +0000.

This is in progress in Blink implementation - design doc at
https://docs.google.com/a/chromium.org/document/d/1k93Ez6yNSyWQDtGjdJJqTBPmljk9l2WS3JTe5OHHB50/edit

@TakayoshiKochi
Copy link
Member

merged to #126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants