flackr / scroll-timeline

A polyfill of ScrollTimeline.
Apache License 2.0
887 stars 82 forks source link

None of the demos work in Firefox or Safari when running locally using the dev server #267

Open haach opened 1 month ago

haach commented 1 month ago

Hey! I wanted to use this polyfill in my library, but when I fired up the demos locally, I noticed that none of them work properly in either OSx Firefox or Safari. On Chrome everything appears to work as expected as far as I can tell.

I am on macOS Ventura (13.6.6)

Here are some recordings:

Chrome, Version 124.0.6367.158 https://github.com/flackr/scroll-timeline/assets/34210193/f2688d5e-8d80-428b-b532-6fb1966765ba

Firefox, version 106.0.1 https://github.com/flackr/scroll-timeline/assets/34210193/06cfab04-253a-4974-b65c-9dd86d51c413

Safari, Version 17.4.1 https://github.com/flackr/scroll-timeline/assets/34210193/feba95f6-ddd6-4415-88c9-d9f870d60fda

Has anyone else ran into a similar issue? I am interested in the scroll( ) function polyfill

Floran-mtte commented 1 month ago

Hey @haach, same here. It isn't working locally or when using the CDN on Safari iOS and macOS 17.4."

bramus commented 1 month ago

Check the console. You’ll see an error that it can’t load thescroll-timeline.js file.

E.g, in Safari:

Failed to load resource: the server responded with a status of 404 (Not Found)

The fix is that you need to build the project first before serving the demos.

# Build
npm run build

# Start DevServer
npm run dev

Preferably, npm run dev would also build the project first (and set up a watcher).

haach commented 1 month ago

Check the console. You’ll see an error that it can’t load thescroll-timeline.js file.

E.g, in Safari:

Failed to load resource: the server responded with a status of 404 (Not Found)

The fix is that you need to build the project first before serving the demos.

# Build
npm run build

# Start DevServer
npm run dev

Preferably, npm run dev would also build the project first (and set up a watcher).

That worked :) Thank you!!

bramus commented 1 month ago

Reopening as it’s best that we get this fixed, or at least make a note of it in the README.