folks - is there anything against doing the following:

Using router, after route change & a component being called, using said component's mounted lifecycle method to the 1st sensible element within it, after a delay of course?

cc @heydon @yatil @scottohara

@marcus @yatil @scottohara This sounds like a good idea. But for maintenance's sake, you should try to manage focus at the router level, rather than per component.

@marcus @yatil @scottohara I think you can just add a watcher to the high level component that contains all your routes, like so:

$route (to, from){
// focus stuff here


@heydon I solved it this way:

-> A watcher in the high level component expecting a certain ref in the component. Then putting focus on the element with said ref.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!