зеркало из https://github.com/mozilla/gecko-dev.git
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)
This commit is contained in:
Родитель
70a7efaddd
Коммит
137d7ccf5d
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче