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

Support autofocus for amp-form #6102

Closed
sachiyos opened this issue Nov 9, 2016 · 4 comments
Closed

Support autofocus for amp-form #6102

sachiyos opened this issue Nov 9, 2016 · 4 comments

Comments

@sachiyos
Copy link

sachiyos commented Nov 9, 2016

There is a request on Stack Overflow to add autofocus for amp-form. It'd be great if we could add autofocus support for amp-form.

@mkhatib
Copy link
Contributor

mkhatib commented Nov 23, 2016

Can you explain some more and maybe link to the stack overflow question?

Is this autofocus for inputs? What's the use case?

@mkhatib mkhatib assigned rudygalfi and unassigned mkhatib Nov 23, 2016
@sachiyos
Copy link
Author

Yes, I meant the autofocus for inputs. The stackoverflow post (http://stackoverflow.com/questions/39771830/is-it-possible-to-have-callback-for-amp-lightbox) requests the autofocus for amp-lightbox. It'd be nice to have autofocus for inputs for these components, that require inputs from users.

@ericlindley-g
Copy link
Contributor

Got it—thanks @sachiyos ! I think we can consider this a feature request to trigger auto-focus on opening <amp-lightbox>, with the specific use-case of focusing on a form input.

Might be a good thing to enable during a larger overhaul into <amp-modal>?

@rudygalfi rudygalfi modified the milestones: New FRs, Pending Triage Feb 2, 2017
@mkhatib mkhatib added this to Backlog in Forms Feb 6, 2017
@rudygalfi rudygalfi assigned ericlindley-g and unassigned rudygalfi Apr 5, 2017
@ericlindley-g ericlindley-g added this to Needs Triage in UI Apr 14, 2017
@ericlindley-g ericlindley-g moved this from Needs Triage to Backlog in UI May 26, 2017
@aghassemi
Copy link
Contributor

Closing as dup of #7626

@ericlindley-g ericlindley-g moved this from Backlog to Done in UI Aug 11, 2017
schlessera added a commit to ampproject/amp-wp that referenced this issue Oct 12, 2019
This seems to go against the HTML5 spec ([only 1 autofocus per document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autofocus)), but from what I've read in the AMP source, it seems to be the way to go for focussing on input within a lightbox (i.e. modal): ampproject/amphtml#6102 (comment)
schlessera added a commit to ampproject/amp-wp that referenced this issue Oct 12, 2019
This seems to go against the HTML5 spec ([only 1 autofocus per document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autofocus)), but from what I've read in the AMP source, it seems to be the way to go for focussing on input within a lightbox (i.e. modal): ampproject/amphtml#6102 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Forms
Backlog
Development

No branches or pull requests

5 participants