Skip to content

Conversation

@JayGeorge
Copy link
Contributor

Related to #13233, this fixes page focus state when navigating around the CP with Inertia.

Usually, the focus state would be reset on each page load, but Inertia keeps keyboard focus it in its current position, which is undesirable.

This PR loads checks explicitly-set focus states first.
If no focus state is set, then we fall back to setting keyboard focus on the #main-content

This along with #13356 should close #13233

@duncanmcclean duncanmcclean linked an issue Dec 18, 2025 that may be closed by this pull request
@jackmcdade
Copy link
Member

This seems like an improvement overall, though I'm noticing a few places autofocus doesn't catch properly on an Inertia request:

  • Create new Blueprint
  • Create new Fieldset
  • Create new Globals Set
  • Create New Navigation

...basically all the Create New Container-level things. Create new Entry etc works great.

@jasonvarga jasonvarga changed the base branch from master to 6.x January 28, 2026 16:28
@jackmcdade jackmcdade merged commit 0054df2 into 6.x Jan 30, 2026
11 checks passed
@jackmcdade jackmcdade deleted the improve-focus-on-page-load branch January 30, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command palette button styling suggest you can type in it

3 participants