willmcpo / body-scroll-lock

Body scroll locking that just works with everything 😏
MIT License
4.06k stars 339 forks source link

Is this package dead/abandoned? #257

Open jordie23 opened 2 years ago

jordie23 commented 2 years ago

No updates since 2021, many open issues. Anyone know if there's a fork or another maintained package?

Kreeg commented 2 years ago

The author himself made the last commit a year ago. It more likely to be abandoned. The good news is we can fork this and do necessary updates by our self.

Brianzchen commented 2 years ago

There's also a bug on ios with a fix that hasn't been merged. So I conclude yes unfortunately

Kreeg commented 2 years ago

@willmcpo @jvitela Hi! Do you have any plans for this project? If no - maybe you should create a team to collaborate on this? I'm sure there are people interested in this. Yes, technically we can fork to own repo, but if there will be no support for this project from the dev team, it's better to transfer this repo to interested people

jvitela commented 2 years ago

Hi @Kreeg, I am not a maintainer of this library and I am no longer working with it. @willmcpo doesn't seem active on Github since 2021.

kosmeln commented 2 years ago

Could anybody recommend a decent alternative? I've browsed a few, but was unsure there is a bulletproof one - especially with all iOS concerns.

fjeldsoe commented 2 years ago

@kosmeln It's coming to CSS in the near future: https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior

kosmeln commented 2 years ago

@fjeldsoe , thanks a lot!

sancarr commented 2 years ago

@kosmeln This seems to work well and address all iOS concerns as well: https://github.com/tuax/tua-body-scroll-lock

i3web commented 2 years ago

@kosmeln It's coming to CSS in the near future: https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior

thanks a lot ! it works well.

krutoo commented 2 years ago

@kosmeln It's coming to CSS in the near future: https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior

It's great but many iOS users still uses old iOS/Safari

Can someone recommend alternative library that works with older and newer iOS Safari?

rick-liruixin commented 1 year ago

They stopped maintenance. I had to work it out myself, using the same approach, with a new version of typeScript. And fix the original problem, available for everyone to use.

npm i body-scroll-lock-upgrade
KilianSSL commented 1 year ago

@krutoo I ended up using tua-body-scroll-lock, it's inspired by body-scroll-lock and works as intended. I'd strongly discourage anyone from using body-scroll-lock any further.

Brianzchen commented 1 year ago

@KilianSSL Can you link the npm package? Can't seem to find it

KilianSSL commented 1 year ago

I've fixed the name, sorry for that...

Kreeg commented 1 year ago

tua-body-scroll-lock was updated 2 years ago. It seems to be abandoned too

simonmaass commented 1 year ago

anyone find a good alternative?

Found these:

Does anyone have experience or can recommend something?

krutoo commented 1 year ago

@simonmaass i tried https://github.com/rick-liruixin/body-scroll-lock-upgrade and it seems to work well for me

dangelion commented 4 months ago

On July 2024 overscroll-behavior has 95% usage https://caniuse.com/css-overscroll-behavior I think it's time to adopt that and abandon all these junky JS hacks.

Here's a good reference https://ishadeed.com/article/prevent-scroll-chaining-overscroll-behavior/

thisisjamessmith commented 1 month ago

On July 2024 overscroll-behavior has 95% usage https://caniuse.com/css-overscroll-behavior I think it's time to adopt that and abandon all these junky JS hacks.

Here's a good reference https://ishadeed.com/article/prevent-scroll-chaining-overscroll-behavior/

Seems like overscroll-behavior is still not quite ready for production usage. The author of that article (and a great article it is too!), casually dismisses one of the major drawbacks:

An interesting thing to keep in mind though is that when the navigation is short (and thus isn’t scrollable), and a user tried to scroll for no reason, the body will scroll, even if overscroll-behavior-y: contain is set. ... Unfortunately, I’m not aware of a fix for that other than the “hacks” introduced at the beginning of the article.

It's pretty critical to be able to lock the body scroll when a modal/dialog is in the top layer, regardless of how much content is inside. I'm mostly using Tua Body Scroll Lock at the moment, which is doing the job well, but would be great to abandon it . There's a good thread about all of this at WhatWG here, along with some interesting alternative approaches: https://github.com/whatwg/html/issues/7732 ... in particular this sounds like an interesting idea (haven't tried it myself yet though): https://github.com/whatwg/html/issues/7732#issuecomment-2154195226