- My goal:
Autofocus a different element on each page
- Issue:
With multipage apps, I do not have a mean to call textInput.focus();
anywhere.
Is there a way to select an element to autofocus (different for each page)?
Another solution would be new events for each page such as onEnter
and onExit
where I could call the .focus()
function.
Hey Alexis,
You can create a js query with the .focus() method and have it run upon page load. You would have a js query for each page.
I agree with you though that there should be a better way of controlling what happens on load of each page.
This complains as the actual elements are not available globally but on each page.
Right, you would need a query locally in each page...