fix(chat): restore Facebook keyboard avoidance
This commit is contained in:
@@ -44,6 +44,8 @@ export interface ChatKeyboardDebugSnapshot {
|
||||
activeFocused: boolean;
|
||||
inputBarTop: number | null;
|
||||
inputBarBottom: number | null;
|
||||
inputBarPaddingBottom: string | null;
|
||||
keyboardBottomInset: string | null;
|
||||
appViewportHeight: string | null;
|
||||
appVisibleHeight: string | null;
|
||||
appVisibleOffsetTop: string | null;
|
||||
@@ -157,7 +159,9 @@ function createChatKeyboardDebugSnapshot(
|
||||
const platform = PlatformDetector.getPlatformInfo();
|
||||
const browser = BrowserDetector.getBrowserInfo();
|
||||
const rootStyle = document.documentElement.style;
|
||||
const inputBarRect = containerRef.current?.getBoundingClientRect() ?? null;
|
||||
const inputBar = containerRef.current;
|
||||
const inputBarRect = inputBar?.getBoundingClientRect() ?? null;
|
||||
const inputBarStyle = inputBar ? window.getComputedStyle(inputBar) : null;
|
||||
|
||||
return {
|
||||
event,
|
||||
@@ -187,6 +191,9 @@ function createChatKeyboardDebugSnapshot(
|
||||
activeFocused: activeElement !== document.body,
|
||||
inputBarTop: inputBarRect?.top ?? null,
|
||||
inputBarBottom: inputBarRect?.bottom ?? null,
|
||||
inputBarPaddingBottom: inputBarStyle?.paddingBottom ?? null,
|
||||
keyboardBottomInset:
|
||||
inputBar?.style.getPropertyValue("--chat-keyboard-bottom-inset") || null,
|
||||
appViewportHeight:
|
||||
rootStyle.getPropertyValue("--app-viewport-height") || null,
|
||||
appVisibleHeight:
|
||||
|
||||
Reference in New Issue
Block a user