fix(chat): adjust bottom inset values and fallback delay for keyboard avoidance

This commit is contained in:
2026-07-16 16:48:28 +08:00
parent 514297f469
commit d84899fc82
4 changed files with 13 additions and 13 deletions
@@ -46,7 +46,7 @@ describe("resolveChatKeyboardInset", () => {
),
).toEqual({
keyboardVisible: true,
bottomInset: 308,
bottomInset: 316,
source: "visual-viewport",
});
});
@@ -62,7 +62,7 @@ describe("resolveChatKeyboardInset", () => {
),
).toEqual({
keyboardVisible: true,
bottomInset: 328,
bottomInset: 336,
source: "virtual-keyboard",
});
});
@@ -83,8 +83,8 @@ describe("resolveChatKeyboardInset", () => {
describe("resolveChatKeyboardFallbackInset", () => {
it("scales with viewport height and remains bounded", () => {
expect(resolveChatKeyboardFallbackInset(500)).toBe(268);
expect(resolveChatKeyboardFallbackInset(800)).toBe(344);
expect(resolveChatKeyboardFallbackInset(1_200)).toBe(388);
expect(resolveChatKeyboardFallbackInset(500)).toBe(276);
expect(resolveChatKeyboardFallbackInset(800)).toBe(352);
expect(resolveChatKeyboardFallbackInset(1_200)).toBe(396);
});
});