background-scroll-physics icon indicating copy to clipboard operation
background-scroll-physics copied to clipboard

Doesn't work on iOS inside an iframe

Open lonekorean opened this issue 7 years ago • 0 comments

The background scrolls statically with the page. No physics-based movement.

The problem stems from how iOS handles iframe height: https://blog.codepen.io/2017/12/01/stupid-iframes-stupid-ios/ . This causes the canvas element to be sized to the content height instead of the viewport height.

Possible workaround is to hide the body, get viewport height, then restore body.

lonekorean avatar Jul 14 '18 16:07 lonekorean