-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Comments
Can you explain some more and maybe link to the stack overflow question? Is this autofocus for inputs? What's the use case? |
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. |
Got it—thanks @sachiyos ! I think we can consider this a feature request to trigger auto-focus on opening Might be a good thing to enable during a larger overhaul into |
Closing as dup of #7626 |
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)
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)
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.
The text was updated successfully, but these errors were encountered: