From bf88024cb37f89a12a28facfac2cf486179213b2 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Tue, 16 Feb 2016 04:17:33 +0500 Subject: [PATCH] fix modals' scroll on resuming --- js/interface_common.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/interface_common.js b/js/interface_common.js index 5316a19..883be88 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -165,13 +165,7 @@ function minimizeModal(modal, switchMode) { if (modal.is('.closed')) return; var scroll; // MUST be setted before modal.detach(), modal.fadeOut() and so on - if (modal.is('.directMessages') || modal.is('.group-messages-new-group') - || modal.is('.group-messages-join-group') || modal.is('.following-own-modal')) { - scroll = { - targetSelector: '.modal-content', - top: modal.find('.modal-content').scrollTop() - }; - } else if (modal.is('.profile-modal')) { + if (modal.is('.profile-modal')) { if (modal.find('.profile-card').attr('data-screen-name')[0] === '*') scroll = { targetSelector: '.modal-content .members', @@ -182,7 +176,11 @@ function minimizeModal(modal, switchMode) { targetSelector: '.modal-content .postboard-posts', top: modal.find('.modal-content .postboard-posts').scrollTop() }; - } + } else + scroll = { + targetSelector: '.modal-content', + top: modal.find('.modal-content').scrollTop() + }; if (switchMode) minimize(modal, scroll);