fix(ui): end an anchored dialog above the tablet keyboard
Final review M-2: maxHeight runs to the visual viewport's bottom, not the layout viewport's, so « Enregistrer » stays reachable while a keyboard leaves 320 px or more. New unit case beside the keyboard one.
This commit is contained in:
1 parent
9e1ec4479d
commit
323a342586
2 files changed
+20
-1
No files matched your search
@@ -29,7 +29,7 @@ export function placeOver(anchor: HTMLElement | null): AnchoredPlace | null {
|
||||
const top = Math.max(EDGE, box.top)
|
||||
const side = { left: box.left, width: box.width }
|
||||
if (bottom - top - EDGE >= MIN_SPACE) {
|
||||
return { ...side, top, maxHeight: window.innerHeight - top - EDGE }
|
||||
return { ...side, top, maxHeight: bottom - top - EDGE }
|
||||
}
|
||||
const shown = viewport?.height ?? window.innerHeight
|
||||
const offset = viewport?.offsetTop ?? 0
|
||||
|
||||
Reference in new issue
Block a user