Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on Safari macOS (10.11+) #16

Open
hogash opened this issue Oct 22, 2015 · 24 comments
Open

Doesn't work on Safari macOS (10.11+) #16

hogash opened this issue Oct 22, 2015 · 24 comments
Labels

Comments

@hogash
Copy link

hogash commented Oct 22, 2015

Hey @galambalazs great work!

I seem to make it work properly on Windows, however not on Mac (OSX El Capitan).

isMac var. is detecting mac and code is running, but still, the smooth scroll doesn't work and can't figure out why. Would be great for someone to confirm this issue as i only have one OSX machine around.

Thanks!!

@gblazex
Copy link
Owner

gblazex commented Oct 22, 2015

I can confirm this. But it's Safari only for you as well right?

Works for me in Chrome & El Cap

@gblazex
Copy link
Owner

gblazex commented Oct 22, 2015

(probably Safari 9 to be exact, might be happening under other versions of OS X with that version of Safari)

@hogash
Copy link
Author

hogash commented Oct 22, 2015

Thanks for getting back so quickly! :)

Hmm, for me it seems not to be working on any browser:

  • Chrome Version 46.0.2490.71 (64-bit)
  • Version 9.0 (11601.1.56)
  • Firefox 41.0.2

Just added a test here http://hogash-demo.com/marius/smoothscroll/testing.html . Probably it's not the case, but could the actual mouse make a difference?

@gblazex
Copy link
Owner

gblazex commented Oct 22, 2015

works for me on that page in Chrome stable and Canary

@gblazex
Copy link
Owner

gblazex commented Oct 22, 2015

seems to me Deltas are reported differently for Mouse wheel & Trackpad

In Safari 9:
Mouse wheel has varying deltas
Trackpad has constant deltas (one per scrolling sessions)

All other browsers do the opposite as far as I can remember.
(also trackpad used to report multiple wheel events during scrolling, now only 1)

@gblazex gblazex added the bug label Oct 22, 2015
@gblazex
Copy link
Owner

gblazex commented Oct 22, 2015

Don't have much free time to debug this.

The solution would have to work both on El Cap and Older versions.

Right now it degrades gracefully as far as I can see (meaning nothing is broken, it's just not smooth on El Cap).

@hogash
Copy link
Author

hogash commented Oct 22, 2015

No worries @galambalazs thanks for your time!

I will continue to debug and measure the deltas on my comp. vs others. I also think my mouse might be a problem too ( Master MX with custom drivers ).

@gblazex
Copy link
Owner

gblazex commented Oct 22, 2015

what kind of values do you see here with your mouse vs with your trackpad:
http://output.jsbin.com/qahami

@gblazex gblazex changed the title Issues on OSX Issues on OSX 10.11 El Capitan Oct 22, 2015
@hogash
Copy link
Author

hogash commented Oct 22, 2015

Here you go:

Mouse:

Console: 
wheelDeltaY, deltaY :: scrollTop 
-39, 13 :: 0
-39, 13 :: 13
-147, 49 :: 26
-267, 89 :: 75
-39, 13 :: 164
-39, 13 :: 177
-39, 13 :: 190
-39, 13 :: 203
-120, 40 :: 216
-219, 73 :: 256
-39, 13 :: 329
-39, 13 :: 342
-204, 68 :: 355
-357, 119 :: 423
-414, 138 :: 542
-39, 13 :: 680
-39, 13 :: 693
-144, 48 :: 706
-240, 80 :: 754
-39, 13 :: 834
-39, 13 :: 847
-39, 13 :: 860
-39, 13 :: 873
-39, 13 :: 886
-144, 48 :: 899
-264, 88 :: 947
-354, 118 :: 1035
-39, 13 :: 1153

Trackpad:

Console: 
wheelDeltaY, deltaY :: scrollTop 
-3, 1 :: 59
-18, 6 :: 60
-6, 2 :: 66
-6, 2 :: 68
-12, 4 :: 70
-111, 37 :: 74
-21, 7 :: 111
-21, 7 :: 118
-21, 7 :: 125
-195, 65 :: 132
-21, 7 :: 197
-21, 7 :: 204
-207, 69 :: 211
0, 0 :: 280
-39, 13 :: 280
-78, 26 :: 293
-105, 35 :: 319
-33, 11 :: 354
-33, 11 :: 365
-30, 10 :: 376
-27, 9 :: 386
-24, 8 :: 395
-78, 26 :: 403
-15, 5 :: 429
-42, 14 :: 434
-12, 4 :: 448
-9, 3 :: 452
-21, 7 :: 455
-6, 2 :: 462
-9, 3 :: 464
-3, 1 :: 467
-6, 2 :: 468
0, 0 :: 470
-3, 1 :: 470
-3, 1 :: 471
-3, 1 :: 472
-12, 4 :: 473
-3, 1 :: 477
-3, 1 :: 478
-3, 1 :: 479
-12, 4 :: 480
-3, 1 :: 484
-3, 1 :: 485
-12, 4 :: 486
-3, 1 :: 490
-3, 1 :: 491
-3, 1 :: 492
-9, 3 :: 493
-3, 1 :: 496
-3, 1 :: 497
-3, 1 :: 498
-12, 4 :: 499

@bruinebeer
Copy link

+1 Can confirm, this isnt working on el capitan. On all browsers. Smoothscroll on keypress works.

If you need some console data from me as well just holla.

@andremacola
Copy link

Version 1.3.8 is working fine when the script is inside the .html and not as an external file.

@hogash
Copy link
Author

hogash commented Aug 10, 2016

@galambalazs came back on the issue and tried at least to find the cause of the problem.

For the moment i found out that isTouchpad(deltaY) located here https://github.com/galambalazs/smoothscroll-for-websites/blob/master/SmoothScroll.js#L343 always returns true, even though i'm scrolling with the mouse or trackpad.

I'll try to find a solution, but i first need to understand better how it all works and i'm afraid it might take a while, so if you have any suggestions, please throw in.

PS: My setup is the same

Thanks!

@gblazex gblazex changed the title Issues on OSX 10.11 El Capitan Issues on OS X 10.11 & 10.12 Nov 25, 2016
@gnacu
Copy link

gnacu commented Apr 26, 2017

So, you're the one who has foisted SmoothScroll upon us Mac Users? StarTrek.com uses SmoothScroll, and I've been scouring the web desperately searching for some way, ANY WAY, to make this script be gone for ever. The Mac does NOT need any help from a third party script to get it to scroll properly. The scrolling on startrek.com is basically the worst and most broken scrolling experience I've ever seen on any website. Disable Javascript and scrolling goes back to the buttery smooth elastic experience that every other normal website has.

I'm on Sierra, on a MacBook Pro 2016.

@gnacu
Copy link

gnacu commented Apr 26, 2017

I'm not opposed to people messing around and having fun writing scripts. But now major websites have adopted this script, and it literally destroys the user experience. And now there is nothing that I can do to get back what is otherwise perfectly normal and really great scrolling. You have no idea how frustrating it is that your junky buggy script is ruining otherwise perfectly good websites.

@hogash
Copy link
Author

hogash commented Apr 26, 2017

Whoa! Sorry @gnacu but you're literally blaming the wrong side here.

Anyone using it, and especially a multi-billion dollar company should afford a few testers and QA to seek such UX issues and apply very simple workarounds to disable smooth scrolling on Macs.

Do know this is an open source project and there's barely a few people contributing on it https://github.com/galambalazs/smoothscroll-for-websites/graphs/contributors .

You have no idea how frustrating it is that your junky buggy script is ruining otherwise perfectly good websites.

Take 5 minutes and write a simple email to StarTrek.com's web dept (or a shout on Twitter) and i bet they'll fix this right away.

@gblazex
Copy link
Owner

gblazex commented Apr 26, 2017

@gnacu Your criticism is valid but misplaced.

That site uses a very outdated version of this script that is almost 2 years old (v1.3.8 vs v1.4.6).

I publish an open source library here and also via package managers (npm, bower, etc.).

Site owners have the ability as part of their build process to grab the latest version automatically.

This library doesn't change often but when we're talking about 2 years lots of things might change.

Contact the site owners to update the library.

Cheers

@gnacu
Copy link

gnacu commented Jun 22, 2017

You're right. It is indeed the fault of Startrek.com for adopting the script, and then not keeping it up to date, or testing to see how broken it makes macOS/Safari.

But, I don't have a platform for complaining to them.

I did, however, discover that adblock plus can be used with a custom filter to block individual scripts from specific or pattern matched domains. So, at the very least I'm able to block it.

@drinkmaker
Copy link

Hi,
On the last versions also not work: Safari 10.1.2 on macOS 10.12.6

@gblazex gblazex changed the title Issues on OS X 10.11 & 10.12 Issues on Safari macOS Oct 22, 2019
@gblazex gblazex changed the title Issues on Safari macOS Doesn't work on Safari macOS (10.11+) Oct 22, 2019
@lichingchester
Copy link

Hi @gblazex,

Here is the polyfill for fixing the smooth behavior on Safari. Can it be possible to work on Safari with your library too?

smoothscroll-polyfill

@gblazex
Copy link
Owner

gblazex commented Feb 13, 2020 via email

@AvailingFaith
Copy link

Checking in to see if there's any hope in the Safari pipeline. Seems Safari is really trying to force those trackpads, even for desktops.

@gblazex
Copy link
Owner

gblazex commented May 13, 2021 via email

@AvailingFaith
Copy link

Roger. Looking for something that forces the state for users, not myself. Appreciate you work either way, SmoothScroll plugin works great for all but Safari. Seems thats as close as I'm getting until Apple changes something.

@gblazex
Copy link
Owner

gblazex commented May 17, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants