'Shift + Space' should scroll upwards

VERIFIED FIXED

Status

SeaMonkey
MailNews: Message Display
VERIFIED FIXED
16 years ago
14 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: (not reading, please use seth@sspitzer.org instead))

Tracking

Trunk
x86
Windows 95

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

16 years ago
As per bug 104371, but for mail; currently shift + space scrolls down.
(Reporter)

Comment 1

16 years ago
Created attachment 106218 [details] [diff] [review]
Proposed patch
(Reporter)

Updated

16 years ago
Attachment #106218 - Flags: superreview?(sspitzer)
Attachment #106218 - Flags: review?(sspitzer)
Comment on attachment 106218 [details] [diff] [review]
Proposed patch

sr=bzbarsky if seth reviews
Attachment #106218 - Flags: superreview?(sspitzer) → superreview+
how about this, instead?

-     <key id="space" key=" " oncommand="SpaceHit()"/>
+     <key id="space" key=" " oncommand="SpaceHit(event);"/>

and then:

function SpaceHit(event)
{
  var contentWindow = window.top._content;
  var oldScrollY = contentWindow.scrollY;

  if (event && event.shiftKey) {
    contentWindow.scrollByPages(-1);
    // if at the end of the message, go to the next one
    if (oldScrollY == contentWindow.scrollY) {  (XXX is oldScrollY == 0 better?)
      goDoCommand('cmd_previousUnreadMsg');
    }
  }
  else {
    contentWindow.scrollByPages(1);
    // if at the end of the message, go to the next one
    if (oldScrollY == contentWindow.scrollY) {
      goDoCommand('cmd_nextUnreadMsg');
    }
  }
}
Created attachment 106905 [details] [diff] [review]
patch, testing it now...
Attachment #106218 - Attachment is obsolete: true
(Reporter)

Comment 5

16 years ago
Comment on attachment 106905 [details] [diff] [review]
patch, testing it now...

My preference would be for a "reverse" parameter to SpaceHit (you would then
pass event.shiftKey as a parameter).
the patch I attached works.  (but asserts)

nsMsgDBView.cpp

    // found unread message but we don't know the thread
    if (*pResultKey != nsMsgKey_None && resultThreadId && *resultThreadId ==
nsMsgKey_None) {
        NS_ASSERTION(0,"fix this");
        //*resultThreadId = m_db->GetThreadIdForMsgId(*pResultKey);
    }

neil, I don't see why your preference is better.  can you elaborate?
fix checked in, but lets continue the discussion.

I'll log a bug on the assertion.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
assertion bug is bug 181077
Comment on attachment 106218 [details] [diff] [review]
Proposed patch

I checked in my patch.
Attachment #106218 - Flags: review?(sspitzer) → review-

Comment 10

16 years ago
Shift+Space now scrolls upward in a thread pane which has unread items above
selection point.
It also scrolls upward in a message pane or standalone window within the pane.
OK using nov21 commercial trunk: win98, linux rh8.0, mac OS 10.2
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.