Skip to content

Conversation

@s21v1d9p
Copy link
Contributor

When a new tab is created, the location bar should automatically receive keyboard focus so users can immediately start typing a URL. However, the onURLChange callback was stealing focus back to the web view when loading the new tab page.

This fix:

  1. Calls focusLocationToolbarItem when activating a new tab
  2. Prevents onURLChange from stealing focus when loading the new tab page URL

Fixes #1512

When a new tab is created, the location bar should automatically
receive keyboard focus so users can immediately start typing a URL.
However, the onURLChange callback was stealing focus back to the
web view when loading the new tab page.

This fix:
1. Calls focusLocationToolbarItem when activating a new tab
2. Prevents onURLChange from stealing focus when loading the new
   tab page URL

Fixes LadybirdBrowser#1512
@gmta gmta merged commit 5b7c9af into LadybirdBrowser:master Nov 26, 2025
10 checks passed
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.

Search bar not auto-selected when opening a new tab in window mode on macOS

2 participants