question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Content doesn't scroll in Safari browser

See original GitHub issue

Safari 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:

https://github.com/keithclark/3d-model-element/blob/2d16b02b14dfd761d376e3189ef419e497dfb4c9/src/model-element.js#L151-L152

Note: I’ve had reports that this is fixed in the latest Tech Preview.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
keithclarkcommented, Apr 12, 2018

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 split domUtils. 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 to THREE.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.

0reactions
shshawcommented, Mar 22, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found