From 8537f0fa829ab225c348d1de4ecceaa2ba61ff92 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Thu, 31 Jul 2025 13:11:48 +0200 Subject: [PATCH] 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. --- UI/AppKit/Interface/TabController.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/UI/AppKit/Interface/TabController.mm b/UI/AppKit/Interface/TabController.mm index 0ac77cb1bed..8bac24f81f2 100644 --- a/UI/AppKit/Interface/TabController.mm +++ b/UI/AppKit/Interface/TabController.mm @@ -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