Open Bug 295020 Opened 15 years ago Updated 2 years ago

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

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

References

(Depends on 1 open bug, )

Details

(Keywords: testcase, Whiteboard: DUPEME)

Attachments

(2 files)

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.
Attached file testcase
Whiteboard: DUPEME
Duplicate of this bug: 458784
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?
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.
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
Just use:
window.onkeydown = function(e) {
e.preventDefault();
}
as a workaround for this bug.
Duplicate of this bug: 460725
Duplicate of this bug: 491846
Flags: in-litmus?
Duplicate of this bug: 501017
Duplicate of this bug: 547019
Attached patch a patchSplinter Review
This is not yet fully tested.
The patch breaks keyboard scrolling on http://quality.mozilla.org/get-involved
Duplicate of this bug: 565732
Duplicate of this bug: 600519
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.
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.
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.
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.
Duplicate of this bug: 1172932
Duplicate of this bug: 1178165
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Duplicate of this bug: 1172506
You need to log in before you can comment on or make changes to this bug.