fix: reserve keyboard inset in layout push

This commit is contained in:
Zzy
2026-08-22 00:15:06 +08:00
parent 27cd211bb3
commit f52cb8779e
2 changed files with 14 additions and 4 deletions
+7 -1
View File
@@ -13,7 +13,13 @@ describe('Sidebar layout-push integration', () => {
expect(source).toContain('setVisualViewportHeight(Math.max(0, Math.round(vv.height)))')
expect(source).toContain('visualViewportHeight ?? viewport.height')
expect(source.match(/viewportHeight: layoutViewportHeight/g)).toHaveLength(4)
expect(source).toContain('viewport.width, layoutViewportHeight]')
expect(source).toContain('viewport.width, layoutViewportHeight, keyboardInset]')
})
it('adds the keyboard inset to the conversation push, not the panel height', () => {
expect(source.match(/height \+ keyboardInset/g)).toHaveLength(2)
expect(source).toContain('height: bottomPanelHeight')
expect(source).not.toContain('height: bottomPanelHeight + keyboardInset')
})
it('reapplies the visible-height cap to every vertical drag result', () => {