(js) Fix scrolling when deleting a message
parent
a4e44e1e65
commit
05ca00296d
1
NEWS
1
NEWS
|
@ -16,6 +16,7 @@ Bug fixes
|
|||
- [web] improved detection of URLs and email addresses in text mail parts
|
||||
- [web] fixed page reload with external IMAP account (#4709)
|
||||
- [web] constrained absolute-positioned child elements of HTML mail parts
|
||||
- [web] fixed useless scrolling when deleting a message
|
||||
- [core] allow super users to modify any event (#4216)
|
||||
- [core] correctly handle the full cert chain in S/MIME
|
||||
- [core] handle multidays events in freebusy data
|
||||
|
|
|
@ -314,7 +314,8 @@
|
|||
|
||||
this.deleteMessage = function() {
|
||||
var mailbox, message, state, nextMessage, previousMessage,
|
||||
parentCtrls = $parentControllers();
|
||||
parentCtrls = $parentControllers(),
|
||||
$timeout = this.service.$timeout;
|
||||
|
||||
if (parentCtrls.messageCtrl) {
|
||||
mailbox = parentCtrls.mailboxCtrl.selectedFolder;
|
||||
|
@ -360,10 +361,12 @@
|
|||
state.go('mail.account.virtualMailbox.message', {mailboxId: encodeUriFilter(nextMessage.$mailbox.path), messageId: nextMessage.uid});
|
||||
else
|
||||
state.go('mail.account.mailbox.message', {messageId: nextMessage.uid});
|
||||
if (nextIndex < mailbox.$topIndex)
|
||||
mailbox.$topIndex = nextIndex;
|
||||
else if (nextIndex > mailbox.$lastVisibleIndex)
|
||||
mailbox.$topIndex = nextIndex - (mailbox.$lastVisibleIndex - mailbox.$topIndex);
|
||||
$timeout(function() {
|
||||
if (nextIndex < mailbox.$topIndex)
|
||||
mailbox.$topIndex = nextIndex;
|
||||
else if (nextIndex > mailbox.$lastVisibleIndex)
|
||||
mailbox.$topIndex = nextIndex - (mailbox.$lastVisibleIndex - mailbox.$topIndex);
|
||||
});
|
||||
}
|
||||
else {
|
||||
state.go('mail.account.mailbox').then(function() {
|
||||
|
|
Loading…
Reference in New Issue