Content doesn't scroll in Safari browser
See original GitHub issueSafari doesn’t update the scrollTop
/ scrollLeft
properties of an element its any of its ancestors has overflow
set to hidden
.
Scroll offset is used to calculate the final render position of a 3D object so, in Safari, elements never scroll:
Note: I’ve had reports that this is fixed in the latest Tech Preview.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Safari won't scroll - Apple Community
Try double clicking the Home button or swipe up from the bottom of the screen and swipe Safari upwards. Go to Settings/Safari and...
Read more >Safari won't let me scroll on certain websites.
So I accepted, then turned Wipr back on, and the scroll started working. So Wipr was blocking the cookies pop up from appearing,...
Read more >Can't scroll down in Safari on iPad / iPhone / iPod Touch
To overcome this issue, try this: · DON'T DRAG IT. · Disable JavaScript in Safari by tapping tap Settings > Safari. · Try...
Read more >Sometimes webpages in Safari get stuck and won't let me ...
Sometimes webpages in Safari get stuck and won't let me scroll down ... I'm on an iPhone 7 and iOS 12.0.1 my guess...
Read more >overflow: auto not working in Safari OSX
overflow: auto; and overflow: scroll; seem to work different on iOS and OS X. Try to use overflow: scroll; plus -webkit-overflow-scrolling: touch; on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I may have a partial solution for this. As part of a different issue I’m working on to support models nested in DOM elements with CSS
overflow
, I’ve had to splitdomUtils. getTransformForElement()
into two functions:The original
getTransformForElement()
will now only return a transform matrix for an element. The new function,getProjectionForElement()
returns the computed perspective value, the accompanying projectionOrigin, the camera position and it’s clipping bounds (which are passed toTHREE.WebGLRenderer.setScissor()
)The upshot of this is, the projection function calls
element.getBoundingClientRect()
, which fixes some demos that use scrolling in Safari. 😄This appears to be limited to some DOM / CSSOM combinations so I need to do some testing to see what works and what doesn’t.
Yes, if the values could be cached and only had to be recalculated on resize then it wouldn’t be a big deal, but anything that affects
style
running every frame will definitely drain perf. This is still on my mind; I’ll reach out if any other ideas pop up.