fix for #180131. shift space should scroll upwards, and at the beginning,

go to the previous unread.  (space alone goes down, and at the end, to the next unread.)

thanks to neil@parkwaycc.co.uk for logging the RFE and providing the initial patch.

(I believe pine and Mail.app do this, much to the delight of their users)


git-svn-id: svn://10.0.0.236/trunk@134189 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com
2002-11-20 11:49:10 +00:00
parent 7831919700
commit 35d0c3fc67
2 changed files with 17 additions and 5 deletions

View File

@@ -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);
}
}

View File

@@ -275,7 +275,7 @@ Rights Reserved.
</commandset>
<keyset id="mailKeys">
<key id="space" key=" " oncommand="SpaceHit()"/>
<key id="space" key=" " oncommand="SpaceHit(event)"/>
<!-- File Menu -->
<key id="key_newNavigator"/>