Skip to content

Commit 76d9500

Browse files
committed
fix(toolbar): use cached keyboard height and clarify safety margin
1 parent 488e48b commit 76d9500

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,14 @@ class _MobileToolbarState extends State<_MobileToolbar>
414414
keyboardHeight = viewInsetsBottom;
415415
} else {
416416
// Use cached height when keyboard is hiding
417-
keyboardHeight = max(keyboardHeight, viewInsetsBottom);
417+
keyboardHeight = max(keyboardHeight, _globalCachedKeyboardHeight);
418418
}
419419
}
420420
}
421421
if (keyboardHeight > 0) {
422+
// Only cache the raw height without safety padding
422423
_globalCachedKeyboardHeight = keyboardHeight;
424+
423425
// Add small safety margin on Android to account for keyboard toolbar
424426
if (defaultTargetPlatform == TargetPlatform.android) {
425427
keyboardHeight += 8.0;

0 commit comments

Comments
 (0)