vertical-scroll

The vertical-scroll policy controls whether a document has the right to override normal scrolling behaviour. When disallowed in a document, calls to event.preventDefault() on scroll-related events will be ineffective, the CSS property touch-action: none will behave as if it is touch-action: pan-y, and element.scrollIntoView() will not propagate outside the document (ie. any parent frame that needs to be scrolled in order for the element to be in view, will not be).

How to apply this policy

Send the following HTTP header to control the vertical-scroll policy, and disallow it on all origins:

Feature-Policy: vertical-scroll 'none'

Does it work?

Currently Firefox, and Chromium based browsers, such as Google Chrome, Samsung Internet, and Opera, are the only user-agents to support Feature Policy. The minimum version that correctly recognises the vertical-scroll policy is:

Mozilla Firefox

Unknown

Google Chrome

Unknown

Microsoft Edge

Not supported

Apple Safari

Not supported

Discussion