-
Notifications
You must be signed in to change notification settings - Fork 98
Autofocus attribute doesn't work reliably #186
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
Comments
I presume it's due to this:
If that's the case them I think Elm should either manage the autofocus in
..., or it should not provide |
I don't know if it's due to some shadow DOM magic, but I just tried this JS workaround and it doesn't work either, leaving me with no way to get an input to autofocus? 😱
|
As mentioned here there is a solution using I'm going to make a PR to update the docs to at least call that out (although I still think it'd be nice if the |
The HTML spec defines the behavior that |
Thanks for the link @ChristophP. I didn't know this:
I don't see a |
I tried to implement ⬆️ here using:
It works insomuch as the |
I also tried ⬆️ here using
Same behavior 😞 |
I am guessing it could be related to two things.
I would try to debug it by running it on a page that you control, not inside ellie. |
Can confirm that this doesn't work, even in a plain web app (i.e. no Ellie, If I run |
Uh oh!
There was an error while loading. Please reload this page.
SSCCE on Ellie:
What I expect: The input is focussed any time it it appears on screen.
What happens: The input is focussed on page load, but not after 'Hide input' then 'Show input' are pressed in succession.
Seen on MacOS Chrome Version 71.0.3578.98 (Official Build) (64-bit).
Elm 0.19.
The text was updated successfully, but these errors were encountered: