Uncover replied-to message by proper amount after clicking.

Fix min-height before doing the calculation of how much a
replied-to message is being covered by the compose box.  This
change also removes an outdated call to slideDown.

(imported from commit e5a3f35bbacff16dffae62c9e9f6bbc7978a13c1)
This commit is contained in:
Steve Howell
2013-05-28 10:55:56 -04:00
parent c50e05bc68
commit b045d4e503

View File

@@ -32,7 +32,8 @@ function show(tabname, focus_area) {
$("#send-status").removeClass(status_classes).hide(); $("#send-status").removeClass(status_classes).hide();
$('#compose').css({visibility: "visible"}); $('#compose').css({visibility: "visible"});
$("#new_message_content").trigger("autosize"); $("#new_message_content").trigger("autosize");
$('.message_comp').slideDown(100, function () { $(".new_message_textarea").css("min-height", "3em");
// If the compose box is obscuring the currently selected message, // If the compose box is obscuring the currently selected message,
// scroll up until the message is no longer occluded. // scroll up until the message is no longer occluded.
if (current_msg_list.selected_id() === -1) { if (current_msg_list.selected_id() === -1) {
@@ -46,8 +47,9 @@ function show(tabname, focus_area) {
if (cover > 0) { if (cover > 0) {
viewport.user_initiated_animate_scroll(cover+5); viewport.user_initiated_animate_scroll(cover+5);
} }
});
focus_area.focus().select(); focus_area.focus().select();
// Disable the notifications bar if it overlaps with the composebox // Disable the notifications bar if it overlaps with the composebox
notifications_bar.maybe_disable(); notifications_bar.maybe_disable();
} }
@@ -209,7 +211,6 @@ exports.start = function (msg_type, opts) {
} else { } else {
show('private', $("#" + (focus_area || 'private_message_recipient'))); show('private', $("#" + (focus_area || 'private_message_recipient')));
} }
$(".new_message_textarea").css("min-height", "3em");
if (opts.replying_to_message !== undefined) { if (opts.replying_to_message !== undefined) {
do_fade(opts.replying_to_message, msg_type); do_fade(opts.replying_to_message, msg_type);