Auto-scroll to selected conversation when reordering them (#2498)

When conversations are reordered (last message time has changed), this commit leads to scrolling the shortest distance to the conversation.
pull/1/head
Matthias Beaupère 7 years ago committed by Scott Nonnenberg
parent e30b34f424
commit 6a611cbecf

@ -47,6 +47,12 @@
var target = this.$('.' + targetConversation.cid);
$el.insertAfter(target);
}
if ($('.selected').length) {
$('.selected')[0].scrollIntoView({
block: 'nearest',
});
}
},
removeItem: function(conversation) {
var $el = this.$('.' + conversation.cid);

Loading…
Cancel
Save