fix(ui): the floating chat window stays above a tablet's on-screen keyboard
This commit is contained in:
1 file changed
+5
-2
@@ -141,10 +141,13 @@ const wrapStyle = computed<Record<string, string> | undefined>((): Record<string
|
||||
}
|
||||
const rect = winRect.value;
|
||||
if (expanded.value) {
|
||||
return { left: `${rect.x}px`, top: `${rect.y}px`, width: `${rect.w}px`, height: `${rect.h}px` };
|
||||
// A tablet's on-screen keyboard covers the layout viewport's bottom; keep
|
||||
// the window, and so its composer, in the part left above it.
|
||||
const fit = keyboard.value > 0 ? fitRect(rect, vw.value, visibleHeight.value) : rect;
|
||||
return { left: `${fit.x}px`, top: `${fit.y}px`, width: `${fit.w}px`, height: `${fit.h}px` };
|
||||
}
|
||||
const bar = barPlacement(rect, mode.value, vw.value);
|
||||
return { left: `${bar.x}px`, bottom: `${bar.bottom}px`, width: `${bar.w}px` };
|
||||
return { left: `${bar.x}px`, bottom: `${bar.bottom + keyboard.value}px`, width: `${bar.w}px` };
|
||||
});
|
||||
|
||||
// Nothing outside the dock closes it: every navigation control is outside it,
|
||||
|
||||
Reference in new issue
Block a user