mirror of
https://github.com/discourse/discourse.git
synced 2025-06-19 22:23:04 +08:00
UX: Do not let composer affect chat window height (#32423)
This commit is contained in:
@ -133,7 +133,9 @@ export default class ComposerBody extends Component {
|
|||||||
this.lastMousePos = mouseYPos(event);
|
this.lastMousePos = mouseYPos(event);
|
||||||
|
|
||||||
DRAG_EVENTS.forEach((dragEvent) => {
|
DRAG_EVENTS.forEach((dragEvent) => {
|
||||||
document.addEventListener(dragEvent, this.throttledPerformDrag);
|
document.addEventListener(dragEvent, this.throttledPerformDrag, {
|
||||||
|
capture: true,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
END_DRAG_EVENTS.forEach((endDragEvent) => {
|
END_DRAG_EVENTS.forEach((endDragEvent) => {
|
||||||
@ -148,7 +150,9 @@ export default class ComposerBody extends Component {
|
|||||||
this.appEvents.trigger("composer:resize-ended");
|
this.appEvents.trigger("composer:resize-ended");
|
||||||
|
|
||||||
DRAG_EVENTS.forEach((dragEvent) => {
|
DRAG_EVENTS.forEach((dragEvent) => {
|
||||||
document.removeEventListener(dragEvent, this.throttledPerformDrag);
|
document.removeEventListener(dragEvent, this.throttledPerformDrag, {
|
||||||
|
capture: true,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
END_DRAG_EVENTS.forEach((endDragEvent) => {
|
END_DRAG_EVENTS.forEach((endDragEvent) => {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
html.composer-open {
|
html.composer-open {
|
||||||
#main-outlet {
|
#main-outlet {
|
||||||
padding-bottom: var(--composer-height);
|
|
||||||
transition: padding-bottom 250ms ease;
|
transition: padding-bottom 250ms ease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
var(--composer-vh, 1vh) * 100 - var(--main-outlet-offset, 0px) - 1px -
|
var(--composer-vh, 1vh) * 100 - var(--main-outlet-offset, 0px) - 1px -
|
||||||
$inset
|
$inset
|
||||||
);
|
);
|
||||||
height: calc($base-height - var(--composer-height, 0px));
|
height: calc($base-height);
|
||||||
|
|
||||||
// mobile with keyboard opened
|
// mobile with keyboard opened
|
||||||
html.keyboard-visible & {
|
html.keyboard-visible & {
|
||||||
@ -14,13 +14,11 @@
|
|||||||
|
|
||||||
// ipad
|
// ipad
|
||||||
html.footer-nav-ipad & {
|
html.footer-nav-ipad & {
|
||||||
height: calc($base-height - var(--composer-height, 0px));
|
height: calc($base-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// PWA/HUB without keyboard
|
// PWA/HUB without keyboard
|
||||||
html.footer-nav-visible:not(.keyboard-visible) & {
|
html.footer-nav-visible:not(.keyboard-visible) & {
|
||||||
height: calc(
|
height: calc($base-height - var(--footer-nav-height, 0px));
|
||||||
$base-height - var(--composer-height, 0px) - var(--footer-nav-height, 0px)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user