UI/AppKit: Focus webview if URL was changed

When we manually enter a new URL and hit enter, the web view gets
focused. But when the URL changes for other reasons, such as starting
Ladybird with a URL argument, the location field was still focused.
This commit is contained in:
Jelle Raaijmakers
2025-07-31 13:11:48 +02:00
committed by Jelle Raaijmakers
parent 0cab272f7f
commit 8537f0fa82
Notes: github-actions[bot] 2025-08-01 08:10:47 +00:00

View File

@@ -169,6 +169,7 @@ static NSString* const TOOLBAR_TAB_OVERVIEW_IDENTIFIER = @"ToolbarTabOverviewIde
- (void)onURLChange:(URL::URL const&)url
{
[self setLocationFieldText:url.serialize()];
[self.window makeFirstResponder:[self tab].web_view];
}
- (void)onBackNavigationEnabled:(BOOL)back_enabled