diff --git a/ui/src/chat/ChatDock.vue b/ui/src/chat/ChatDock.vue index 80c62b236..c53825c3c 100644 --- a/ui/src/chat/ChatDock.vue +++ b/ui/src/chat/ChatDock.vue @@ -28,6 +28,8 @@ import { SWIPE, barPlacement, fitRect, + BAR_W, + INSET, handleOrientation, handleValue, keyboardCover, @@ -118,7 +120,9 @@ const winRect = computed(() => { if (pinned.value) { return { x: mode.value === "left" ? 0 : vw.value - pinW.value, y: 0, w: pinW.value, h: vh.value }; } - return fitRect(layout.value, vw.value, vh.value); + // Opening the window never narrows it below the minimised bar. + const minW = Math.min(BAR_W, vw.value - INSET * 2); + return fitRect({ ...layout.value, w: Math.max(layout.value.w, minW) }, vw.value, vh.value); }); // The part of the layout viewport the on-screen keyboard covers, and the height