Code Monkey home page Code Monkey logo

Comments (12)

moeamaya avatar moeamaya commented on June 24, 2024

Thx for the bug Pete. Most of this code was written by @p-realinho so let me check with him if there's an obvious solution

from rellax.

p-realinho avatar p-realinho commented on June 24, 2024

Hi. I could take a look at the code, but I have no way to test this in Safari :/

from rellax.

petermcreaper avatar petermcreaper commented on June 24, 2024

Thanks @moeamaya @p-realinho.

Attached is a screengrab of the issue in chrome vs safari. The rellax element is the yellow shard in the background. You can see the transform is quite far off in safari at the same page position (+1060px vs -30px).

If there's any way I can help to isolate the issue please let me know.

screen shot 2017-01-22 at 16 00 42

from rellax.

acki avatar acki commented on June 24, 2024

@moeamaya @petemcd @p-realinho Only a nightly spontaneous idea:
Maybe in Safari rellax get a wrong reference point or the reference point delivers some bad values?
@petemcd Can you share the test site with us in a Codepen or similar? Then i can help out with debugging.

from rellax.

petermcreaper avatar petermcreaper commented on June 24, 2024

Hi @acki, sorry about the delay. I think that might be the issue.

Here's a link to the test site (still needs some polishing 😅): http://terrydesign.co.uk/index.php/2017/index.html

from rellax.

moeamaya avatar moeamaya commented on June 24, 2024

@petemcd This is a super late reply and I know you've launched the site, but is this still an issue?

from rellax.

matteightarms avatar matteightarms commented on June 24, 2024

Also encountering this issue in safari @petemcd did you find a workaround for this?

from rellax.

MrUltimate avatar MrUltimate commented on June 24, 2024

I'm also having this issue. @petemcd @matteightarms did you guys ever find a workaround?

from rellax.

matteightarms avatar matteightarms commented on June 24, 2024

@MrUltimate No I didn't sadly! Sorry.

from rellax.

guidoschmidt avatar guidoschmidt commented on June 24, 2024

We recently experienced that issue, too. What solved it for us was using an Intersection Observer on all of the .rellax classes and call rellax.refresh() once the element is seen by the Observer (and then unobserve the element again). Feels like a rather nasty fix but worked out quite well.

from rellax.

moeamaya avatar moeamaya commented on June 24, 2024

@MrUltimate @matteightarms @guidoschmidt Happy to accept a PR that addresses this. Unfortunately just too preoccupied with family and the day job at the moment.

from rellax.

guidoschmidt avatar guidoschmidt commented on June 24, 2024

I've tried to understand the code of rellax.js a bit today. Really not sure, but it appears to me, that browsers differ in their way of returning getBoundingClientRect().top depending on their document loading lifecycle. See #180

Would be nice if someone could validate my suspicion and test is. I've also created a small test setup here: guidoschmidt/rellax.js.bug

from rellax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.