mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
Don't try to scroll to show composebox when no messages are showing.
(imported from commit 3835c7de0f3cad777b1fd5b609e9dc71635422ac)
This commit is contained in:
@@ -21,6 +21,11 @@ function show(tabname, focus_area) {
|
||||
$('.message_comp').slideDown(100, function () {
|
||||
// If the compose box is obscuring the currently selected message,
|
||||
// scroll up until the message is no longer occluded.
|
||||
if (selected_message_id === -1) {
|
||||
// If there's no selected message, there's no need to
|
||||
// scroll the compose box to avoid it.
|
||||
return;
|
||||
}
|
||||
var cover = selected_message.offset().top + selected_message.height()
|
||||
- $("#compose").offset().top;
|
||||
if (cover > 0) {
|
||||
|
||||
Reference in New Issue
Block a user