Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow controlling autofocus behavior #2698
I was annoyed by how chrome puts the cursor at the beginning of this input element
<input type="url" value="http://" autofocus>
Safari and Firefox did select the hole text which i found to be more useful
I think it could be useful if you could set a behavior with the attribute rather then it being a boolean attribute
I think this might be an observable interop issue. See https://boom-bath.glitch.me/autofocus-range.html which prints selectionStart and selectionEnd after autofocus.
It seems this is just a Safari bug, as far as I can tell.