compose: Fix "You need to scroll" notifications for large messages.

When you just sent a large message, our logic for "you need to scroll"
notifications did not correctly take into account the height of the
compose box.  This was easily reproduced when sending very long
messages.  The correct solution requires a bit of math to compute what
the visible area will look like after the compose box is closed.

This should be the final fix to #11138.
This commit is contained in:
Tim Abbott
2019-02-05 13:12:28 -08:00
parent 20769f0fe9
commit 309aef4c27
2 changed files with 19 additions and 1 deletions

View File

@@ -78,6 +78,7 @@ function show_box(msg_type, opts) {
}
$("#compose-send-status").removeClass(common.status_classes).hide();
$('#compose').css({visibility: "visible"});
// When changing this, edit the 42px in _maybe_autoscroll
$(".new_message_textarea").css("min-height", "3em");
exports.set_focus(msg_type, opts);