mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
fix scroll after attachment cancel
This commit is contained in:
parent
058cfb0ac7
commit
76e5c9a7ee
@ -63,6 +63,10 @@ $(window).load(() => {
|
||||
$('body').css('opacity', 1); // use opacity because setting focus on display: none elements fails
|
||||
});
|
||||
|
||||
var scrollToMessageListBottom = _.throttle(() => {
|
||||
$('#message-view').scrollTop($('#message-view')[0].scrollHeight - $('#message-view')[0].clientHeight);
|
||||
}, 100, true);
|
||||
|
||||
$('#login').hide();
|
||||
var localStorageKey = localStorage.getItem('chatKeyPair');
|
||||
if (localStorageKey) {
|
||||
@ -417,6 +421,7 @@ function closeAttachmentsPreview() {
|
||||
if (activeChat) {
|
||||
chats[activeChat].attachments = null;
|
||||
}
|
||||
scrollToMessageListBottom();
|
||||
}
|
||||
|
||||
function closeAttachmentsGallery() {
|
||||
@ -1233,10 +1238,6 @@ var askForPeers = _.once(pub => {
|
||||
});
|
||||
});
|
||||
|
||||
var scrollToMessageListBottom = _.throttle(() => {
|
||||
$('#message-view').scrollTop($('#message-view')[0].scrollHeight - $('#message-view')[0].clientHeight);
|
||||
}, 100, true);
|
||||
|
||||
function addChat(channel) {
|
||||
var pub = channel.getId();
|
||||
if (chats[pub]) { return; }
|
||||
|
Loading…
Reference in New Issue
Block a user