UX: Do not let composer affect chat window height (#32423)

This commit is contained in:
Jordan Vidrine 2025-04-24 09:32:28 -05:00 committed by GitHub
parent bc6dae07ee
commit fe12500767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View File

@ -133,7 +133,9 @@ export default class ComposerBody extends Component {
this.lastMousePos = mouseYPos(event);
DRAG_EVENTS.forEach((dragEvent) => {
document.addEventListener(dragEvent, this.throttledPerformDrag);
document.addEventListener(dragEvent, this.throttledPerformDrag, {
capture: true,
});
});
END_DRAG_EVENTS.forEach((endDragEvent) => {
@ -148,7 +150,9 @@ export default class ComposerBody extends Component {
this.appEvents.trigger("composer:resize-ended");
DRAG_EVENTS.forEach((dragEvent) => {
document.removeEventListener(dragEvent, this.throttledPerformDrag);
document.removeEventListener(dragEvent, this.throttledPerformDrag, {
capture: true,
});
});
END_DRAG_EVENTS.forEach((endDragEvent) => {

View File

@ -1,6 +1,5 @@
html.composer-open {
#main-outlet {
padding-bottom: var(--composer-height);
transition: padding-bottom 250ms ease;
}
}

View File

@ -5,7 +5,7 @@
var(--composer-vh, 1vh) * 100 - var(--main-outlet-offset, 0px) - 1px -
$inset
);
height: calc($base-height - var(--composer-height, 0px));
height: calc($base-height);
// mobile with keyboard opened
html.keyboard-visible & {
@ -14,13 +14,11 @@
// ipad
html.footer-nav-ipad & {
height: calc($base-height - var(--composer-height, 0px));
height: calc($base-height);
}
// PWA/HUB without keyboard
html.footer-nav-visible:not(.keyboard-visible) & {
height: calc(
$base-height - var(--composer-height, 0px) - var(--footer-nav-height, 0px)
);
height: calc($base-height - var(--footer-nav-height, 0px));
}
}