Closed Bug 1327558 Opened 6 years ago Closed 6 years ago

Dropbox: Keyboard scrolling doesn't work in Firefox


(Web Compatibility :: Desktop, defect)

Not set


(platform-rel +)

Tracking Status
platform-rel --- +


(Reporter: arni2033, Unassigned)




(Whiteboard: [platform-rel-Dropbox])

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
1. Open url [1] in a private window. Resize Firefox window to make iframe scrollable
2. Click in iframe (or click on the free place in header)
3. Press Down key (or Up key, or PageUp/PageDown)

AR:  No visible action
ER:  Page should just scroll according to the pressed key

> [1] data:text/html,<script>location.href="https://www.drop"+""</script>

1) Function _verticalScroll sets scrollTop to <body>, not to <html>. This works in GoogleChrome,
   but doesn't work in Firefox (by the way, _horizontalScroll is also broken)
Line 161
    _verticalScroll: function(scrollDistance) {
      $viewerContainer = $j("body");
      $viewerContainer.animate({scrollTop: $viewerContainer.scrollTop() + scrollDistance}, 50);

2) You can also tell them that:
 2.1) Even in GoogleChrome, Shift+Spacebar doesn't scroll the page to the top. It's not an issue for
      me anyway, as I DON'T use this obtrusive way of scrolling (that also breaks web pages)
 2.2) if in Step 2 I click in the header, Home and End buttons don't work in Firefox and GoogleChrome
 2.3) Ctrl+Up/Down button in Firefox is treated as Up/Down, not as Home/End
No longer blocks: 1277113
Component: Untriaged → Desktop
Product: Firefox → Tech Evangelism
platform-rel: --- → ?
Whiteboard: [platform-rel-Dropbox]
platform-rel: ? → +
Flags: needinfo?(miket)
Keyboard scrolling in Firefox (OSX/Windows) and Chrome (OSX) is indeed busted, but working in Chrome (Windows).

(for whatever reason, document.scrollingElement is returning different results in Chrome Canary for Windows and OSX... O-o).

The fix is pretty simple, like arni mentioned, in

Just change 

> $viewerContainer = $j("body");


> $viewerContainer = $j(document.scrollingElement);

That won't work for older browsers, so something like the following will be more compatible:

> $viewerContainer = $j("body, html");

Adam, can we get in touch with Dropbox about this?
Flags: needinfo?(miket) → needinfo?(astevenson)
Whiteboard: [platform-rel-Dropbox] → [platform-rel-Dropbox][contactready]
Reached out via the Dropbox mailing list.
Flags: needinfo?(astevenson)
Whiteboard: [platform-rel-Dropbox][contactready] → [platform-rel-Dropbox][sitewait]
This should be resolved now. Thank you for letting us (Dropbox) know! Is there anything I need to do to close this out?
That's great, thanks Mike! It works for me now in Firefox 55 for OSX.
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [platform-rel-Dropbox][sitewait] → [platform-rel-Dropbox]
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.