diff --git a/mozilla/mailnews/base/resources/content/mailWindowOverlay.js b/mozilla/mailnews/base/resources/content/mailWindowOverlay.js index 97847615338..f55292de9ac 100644 --- a/mozilla/mailnews/base/resources/content/mailWindowOverlay.js +++ b/mozilla/mailnews/base/resources/content/mailWindowOverlay.js @@ -1625,16 +1625,28 @@ function MsgGoForward() {} function MsgAddSenderToAddressBook() {} function MsgAddAllToAddressBook() {} -function SpaceHit() +function SpaceHit(event) { var contentWindow = window.top._content; var oldScrollY = contentWindow.scrollY; - contentWindow.scrollByPages(1); + var numPages; + var command; - // if at the end of the message, go to the next one + if (event && event.shiftKey) { + numPages = -1; + command = "cmd_previousUnreadMsg"; + } + else { + numPages = 1; + command = "cmd_nextUnreadMsg"; + } + + contentWindow.scrollByPages(numPages); + + // if at the end (or start) of the message, go to the next one if (oldScrollY == contentWindow.scrollY) { - goDoCommand('cmd_nextUnreadMsg'); + goDoCommand(command); } } diff --git a/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul b/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul index 1f906790f5e..5b320dd5719 100644 --- a/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul +++ b/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul @@ -275,7 +275,7 @@ Rights Reserved. - +