From 6e3b782d4e98a53e73b4992d6cd964536f46e910 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 28 Apr 2026 13:40:01 +0200 Subject: [PATCH] add bottom intent to keyboard size --- .../features/browser/presentation/screens/browser.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/weblibre/lib/features/geckoview/features/browser/presentation/screens/browser.dart b/apps/weblibre/lib/features/geckoview/features/browser/presentation/screens/browser.dart index 77c1c7eb..49154f64 100644 --- a/apps/weblibre/lib/features/geckoview/features/browser/presentation/screens/browser.dart +++ b/apps/weblibre/lib/features/geckoview/features/browser/presentation/screens/browser.dart @@ -404,6 +404,8 @@ class BrowserScreen extends HookConsumerWidget { // Get pixel ratio for converting logical pixels to physical pixels final pixelRatio = MediaQuery.of(context).devicePixelRatio; + final bottomSystemInsetPx = + (MediaQuery.viewPaddingOf(context).bottom * pixelRatio).round(); // Watch find-in-page visibility for the selected tab final findInPageVisible = @@ -450,9 +452,11 @@ class BrowserScreen extends HookConsumerWidget { viewportService.keyboardEvents, onData: (event) { if (!event.isAnimating) { - final nextKeyboardHeight = event.isVisible ? event.heightPx : null; - if (keyboardHeightPx.value != nextKeyboardHeight) { - keyboardHeightPx.value = nextKeyboardHeight; + final nextKeyboardHeightPx = event.isVisible + ? event.heightPx + bottomSystemInsetPx + : null; + if (keyboardHeightPx.value != nextKeyboardHeightPx) { + keyboardHeightPx.value = nextKeyboardHeightPx; } } },