-
Notifications
You must be signed in to change notification settings - Fork 747
Description
For overflow:hidden
scroll containers, as well as (since #4113) for scroll
or auto
scroll containers with visibility: hidden
and descendants that have visibility: visible
, the spec say that programmatic scrolling is allowed, while direct interactive scrolling such as with the mouse wheel is not.
But there doesn't seem to be full agreement about the precise set of things that can/cannot trigger scrolling. There are disagreements between browsers, and disagreements within a single browser on visibility: hidden
vs overflow: hidden
:
Chrome | Safari | Firefox | ||
---|---|---|---|---|
mouse wheel / touch-pad scroll / touch-screen drag | `overflow:hidden` | ❌ | ❌ | ❌ |
`visibility:hidden` | ❌ | ✅ (agreed to switch) | ✅ (agreed to switch) | |
arrow / page-up / page-down / … keys on the scroll container | `overflow:hidden` | ❌ | ❌ | ❌ |
`visibility:hidden` | ❌ | ❌ | ❌ | |
arrow / page-up / page-down / … keys on a descendant | `overflow:hidden` | ❌ | ❌ | ❌ |
`visibility:hidden` | ✅ | ✅ | ✅ | |
tab-focusing a descendant | `overflow:hidden` | ✅ | ✅ | ✅ |
`visibility:hidden` | ✅ | ✅ | ✅ | |
navigating to the fragment identifier of a descendant | `overflow:hidden` | ✅ | ✅ | ✅ |
`visibility:hidden` | ✅ | ✅ | ✅ | |
Extending a selection with the mouse | `overflow:hidden` | ❌ | ❌ | ❌ |
`visibility:hidden` | ✅ | ✅ | ✅ | |
Extending a selection with the keyboard | `overflow:hidden` | ✅ | ✅ | ❌ |
`visibility:hidden` | ✅ | ✅ | ✅ | |
Moving the caret / inserting text in a contenteditable element | `overflow:hidden` | ✅ | ✅ | ✅ |
`visibility:hidden` | ✅ | ✅ | ✅ | |
Search in page | `overflow:hidden` | ❌ | ✅ | ❌ |
`visibility:hidden` | ✅ | ✅ | ✅ |
(results established by playing around with http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=9378)
Presumably, given the resolution in #4113 (comment), we want to get rid of the differences between overflow:hidden
and visibility:hidden
, but which behavior should we pick for each case? What's the higher level principle?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status