mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
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:
@@ -32,22 +32,24 @@ 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,
|
|
||||||
// scroll up until the message is no longer occluded.
|
// If the compose box is obscuring the currently selected message,
|
||||||
if (current_msg_list.selected_id() === -1) {
|
// scroll up until the message is no longer occluded.
|
||||||
// If there's no selected message, there's no need to
|
if (current_msg_list.selected_id() === -1) {
|
||||||
// scroll the compose box to avoid it.
|
// If there's no selected message, there's no need to
|
||||||
return;
|
// scroll the compose box to avoid it.
|
||||||
}
|
return;
|
||||||
var selected_row = current_msg_list.selected_row();
|
}
|
||||||
var cover = selected_row.offset().top + selected_row.height()
|
var selected_row = current_msg_list.selected_row();
|
||||||
- $("#compose").offset().top;
|
var cover = selected_row.offset().top + selected_row.height()
|
||||||
if (cover > 0) {
|
- $("#compose").offset().top;
|
||||||
viewport.user_initiated_animate_scroll(cover+5);
|
if (cover > 0) {
|
||||||
}
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user