Closed Bug 886969 Opened 11 years ago Closed 8 years ago

Fennec allows scrolling of pages with overflow:hidden on the body element

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(fennec48+)

RESOLVED FIXED
Firefox 48
Tracking Status
fennec 48+ ---

People

(Reporter: kats, Unassigned)

References

Details

Attachments

(1 file)

Attached file Test case
If there is a page with overflow:hidden set on the body, it shouldn't be scrollable.
Attachment #767401 - Attachment mime type: text/plain → text/html
For reference I like the behaviour we now have on B2G, where we allow panning/zooming on the initially-visible area for documents with overflow:hidden on the root. If we switch Fennec to APZ we should be able to get this behaviour mostly for free, but if that gets delayed we could modify the JPZC code to behave that way too.
Blocks: 972425
Blocks: 1020670
This bug prevents creating a proper slideout side menu. When the menu is out, the body shouldn't be scrollable, but at this point on FF there's no way to prevent it.
It would be great to see this bug fixed given how long it's been open. Otherwise, it's impossible to scroll inside an overlay.
If this needs to be fixed sooner than switching Fennec to C++ APZ, it shouldn't be too hard. Whoever does triage can let us know.
tracking-fennec: --- → ?
Our goal is to get on C++ APZC within the next
Blocks: apz-fennec
tracking-fennec: ? → 41+
So we're looking at next September?
No longer blocks: apz-fennec
Depends on: apz-fennec
Has anyone found a fix for this? It doesn't look very good. Please share it if you have, I would really appreciate it!
Assignee: nobody → snorp
It looks like this isn't isolated to just the body element, it looks like overflow on a particular axis isn't respected on an element inside body either.  For instance, overflow-y: hidden appears to not work correctly, see this Pen: http://codepen.io/mkascel/pen/XbRbvK
tracking-fennec: 41+ → Nightly+
Assignee: snorp → rbarker
I'm not sure this workaround will work for other implementations but or me it does work with Bootstrap 3 off canvas. (left hand, haven't tried right)

if (navigator.userAgent.match(/Android/i) && navigator.userAgent.match(/Firefox/i)) {
//$('body').css('overflow','hidden');/* jQuery */
document.getElementsByTagName('body')[0].style='overflow:hidden';/* vanilla */
}

I can still scroll vertically on mobile while the horizontal overflow is hidden.
This is fixed in Fennec nightly with the switch to APZ. Marking this dependent on APZ riding the trains on Fennec, so that we close this with the right target milestone when it rides.
Depends on: fennec-aboard-apz
No longer depends on: apz-fennec
Assignee: rbarker → nobody
tracking-fennec: Nightly+ → 48+
Resolved with the APZ stuff
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Just tested this before and after updating to 48 on Android, and confirmed the problem has been fixed.
Great, thanks for checking!
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: