fix(chat): stabilize Facebook keyboard fallback
This commit is contained in:
@@ -196,7 +196,7 @@ export function useChatKeyboardAvoidance({
|
||||
}
|
||||
fallbackApplied = true;
|
||||
applyBottomInset(
|
||||
resolveChatKeyboardFallbackInset(baseline.layoutHeight),
|
||||
resolveChatKeyboardFallbackInset(baseline),
|
||||
"fallback",
|
||||
);
|
||||
}, CHAT_KEYBOARD_FALLBACK_DELAY_MS);
|
||||
@@ -221,6 +221,7 @@ export function useChatKeyboardAvoidance({
|
||||
function readViewportBaseline(): ChatKeyboardViewportBaseline {
|
||||
return {
|
||||
layoutHeight: window.innerHeight,
|
||||
layoutWidth: window.innerWidth,
|
||||
visualHeight: window.visualViewport?.height ?? window.innerHeight,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user