fix(chat): scope keyboard avoidance to Facebook IAB
This commit is contained in:
@@ -38,7 +38,7 @@ describe("resolveChatKeyboardInset", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("uses the visual viewport occlusion without an extra gap", () => {
|
||||
it("uses the visual viewport occlusion with the target gap", () => {
|
||||
expect(
|
||||
resolveChatKeyboardInset(
|
||||
baseline,
|
||||
@@ -46,7 +46,7 @@ describe("resolveChatKeyboardInset", () => {
|
||||
),
|
||||
).toEqual({
|
||||
keyboardVisible: true,
|
||||
bottomInset: 300,
|
||||
bottomInset: 308,
|
||||
source: "visual-viewport",
|
||||
});
|
||||
});
|
||||
@@ -62,7 +62,7 @@ describe("resolveChatKeyboardInset", () => {
|
||||
),
|
||||
).toEqual({
|
||||
keyboardVisible: true,
|
||||
bottomInset: 320,
|
||||
bottomInset: 328,
|
||||
source: "virtual-keyboard",
|
||||
});
|
||||
});
|
||||
@@ -83,8 +83,8 @@ describe("resolveChatKeyboardInset", () => {
|
||||
|
||||
describe("resolveChatKeyboardFallbackInset", () => {
|
||||
it("scales with viewport height and remains bounded", () => {
|
||||
expect(resolveChatKeyboardFallbackInset(500)).toBe(260);
|
||||
expect(resolveChatKeyboardFallbackInset(800)).toBe(336);
|
||||
expect(resolveChatKeyboardFallbackInset(1_200)).toBe(380);
|
||||
expect(resolveChatKeyboardFallbackInset(500)).toBe(268);
|
||||
expect(resolveChatKeyboardFallbackInset(800)).toBe(344);
|
||||
expect(resolveChatKeyboardFallbackInset(1_200)).toBe(388);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user