From ffca1d3d60ed5356654822bd99e940e787def2da Mon Sep 17 00:00:00 2001 From: yggverse Date: Sat, 11 Oct 2025 23:01:21 +0300 Subject: [PATCH] simplify construction --- src/app/browser/window/tab/item/page/navigation/request.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/browser/window/tab/item/page/navigation/request.rs b/src/app/browser/window/tab/item/page/navigation/request.rs index 8d62a1bb..c9e3ea04 100644 --- a/src/app/browser/window/tab/item/page/navigation/request.rs +++ b/src/app/browser/window/tab/item/page/navigation/request.rs @@ -169,14 +169,12 @@ impl Request { // Note: // * Custom GestureClick is not an option here, as GTK Entry has default controller // * This is experimental feature does not follow native GTK behavior @TODO make optional - if !has_focus.take() + if !has_focus.replace(state.contains(StateFlags::FOCUS_WITHIN)) && state.contains(StateFlags::ACTIVE | StateFlags::FOCUS_WITHIN) && this.selection_bounds().is_none() { this.select_region(0, -1) } - // Update last focus state - has_focus.replace(state.contains(StateFlags::FOCUS_WITHIN)); } });