REFACTOR: move composer min-height to CSS (#14378)

This commit is contained in:
Kris 2021-09-20 12:21:24 -04:00 committed by GitHub
parent a5f8996b99
commit a7c342ccb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,6 @@ const START_EVENTS = "touchstart mousedown";
const DRAG_EVENTS = "touchmove mousemove"; const DRAG_EVENTS = "touchmove mousemove";
const END_EVENTS = "touchend mouseup"; const END_EVENTS = "touchend mouseup";
const MIN_COMPOSER_SIZE = 240;
const THROTTLE_RATE = 20; const THROTTLE_RATE = 20;
function mouseYPos(e) { function mouseYPos(e) {
@ -121,7 +120,6 @@ export default Component.extend(KeyEnterEscape, {
const winHeight = $(window).height(); const winHeight = $(window).height();
size = Math.min(size, winHeight - headerHeight()); size = Math.min(size, winHeight - headerHeight());
size = Math.max(size, MIN_COMPOSER_SIZE);
this.movePanels(size); this.movePanels(size);
$composer.height(size); $composer.height(size);
}; };

View File

@ -515,6 +515,12 @@ body.ios-safari-composer-hacks {
body:not(.ios-safari-composer-hacks) { body:not(.ios-safari-composer-hacks) {
#reply-control.open { #reply-control.open {
--min-height: 255px;
min-height: var(--min-height);
&.composer-action-reply {
// we can let the reply composer get a little shorter
min-height: calc(var(--min-height) - 4em);
}
padding-bottom: var(--composer-ipad-padding); padding-bottom: var(--composer-ipad-padding);
} }
} }