With overflow:hidden on the viewport, you should not be able to scroll with the keyboard

REOPENED
Unassigned

Status

()

Core
Layout
REOPENED
13 years ago
7 months ago

People

(Reporter: Martijn Wargers (dead), Unassigned)

Tracking

(Depends on: 1 bug, {testcase})

Trunk
x86
Windows XP
testcase
Points:
---
Bug Flags:
in-litmus ?

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME, URL)

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
Bug 259615 is fixed, but I can still scroll the page when the root element has
overflow:hidden.
See upcoming testcase.
You should also not be able to scroll with the keyboard in this case (not with
arrowkeys/spacebar/pageup/pagedown.
(Reporter)

Comment 1

13 years ago
Created attachment 184169 [details]
testcase
Whiteboard: DUPEME

Updated

9 years ago
Duplicate of this bug: 458784

Comment 3

9 years ago
I believe I have the same problem, checkout www.allstudentrentals.com, wait for the page to load then hit down on your keyboard. Are you using Adobe Flex?

Comment 4

9 years ago
This isn't plugin related.  See the testcase which is simple html/css.  When I looked at the site you gave I saw the overflow was set to hidden on the body using the DOM inspector.  

I'm not sure which bug Boris had in mind when adding DUPEME.  Perhaps that would be Bug 259615 but since that's fixed perhaps that should be Bug 325942 instead? Or this bug doesn't need duping now.

Comment 5

9 years ago
does anyone have any solutions to this issue? Why does this only happen in Firefox and not IE or Chrome? I am new to Bugzilla, how do I get this error fixed? My website, www.allstudentrentals.com has the majority of Firefox hits and this bug is annoying to users
(Reporter)

Comment 6

9 years ago
Just use:
window.onkeydown = function(e) {
e.preventDefault();
}
as a workaround for this bug.

Updated

9 years ago
Duplicate of this bug: 460725

Updated

9 years ago
Duplicate of this bug: 491846

Updated

9 years ago
Flags: in-litmus?

Updated

8 years ago
Duplicate of this bug: 501017

Updated

8 years ago
Duplicate of this bug: 547019
Created attachment 428074 [details] [diff] [review]
a patch

This is not yet fully tested.
The patch breaks keyboard scrolling on http://quality.mozilla.org/get-involved

Updated

8 years ago
Duplicate of this bug: 565732
Duplicate of this bug: 600519
Depends on: 325942
Have stumbled across this bug as well while designing a page layout with a fixed footer, which depends on the body's height being exactly the viewport's height.

This layout breaks if the page contents become too large for the viewport even with overflow: hidden set on the body. This has nothing to do with preventing any keyboard navigation, so the workaround suggested above in Comment 6 is not really one.

Comment 16

4 years ago
I can confirm this bug exists in FF27.
overflow:-moz-hidden-unscrollable; will do no effect without max-heigt:100%; that will breaks scroll position 
Also want to add quote from css3-box model about overflow:hidden

hidden
    This value indicates that the content is clipped and that no scrolling mechanism should be provided to view the content outside the clipping region.

Current used solution for me is to reset scroll positions on window.onscroll event.

Comment 17

4 years ago
I can confirm that this bug still exists in FF29. I'm creating a coverflow-like effect and the photos that are partly outside the viewport allow the arrow keys to scroll laterally.

Comment 18

3 years ago
I can confirm that this bug still exists in FF30.0. Using a carousel library (flexslider) with a range of floating (inline) images, and overflow-x: hidden set on <body>, no scrollbar is shown but the arrow keys do trigger horizontal scrolling.

Updated

2 years ago
Duplicate of this bug: 1172932
Duplicate of this bug: 1178165
(Reporter)

Updated

7 months ago
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.