-
-
Notifications
You must be signed in to change notification settings - Fork 8
Replace scrl with a native scroll implementation #88
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
Conversation
- support scrolling the closest scrolling element from an anchor element - keep the hooks - keep the `autoKill` feature (cancel scroll upon user interaction)
|
Fantastic! 🥳 I'll give this a try soon. Major version sounds good, since the scroll duration is now different and some sites might rely on that. Also, all in favor of finally adding tests! Although I suspect there's a reason it's currently untested — lots and lots of flaky Playwright magic... |
|
Yeah... let alone the fixtures we'll need for writing proper tests 🤯😅 |
while determining the scrollingElement's height
|
I love it, works great! Scrolling is quite a bit smoother when using the native implementation. Would be amazing to extend this and both scroll the overflow container into view, as well as scroll the container to reveal the nested anchor element. Recursive scrollIntoView, so to say. I'll see if I can make it work without too much contortion... And I'd like to think of a nicer API than overwriting the |
|
Should we still do these things in separate PRs? This one changes a lot already. |
|
Maybe we could merge these things into a |
|
Yes to both! I've started tinkering with this on a separate branch. Let's merge this one into |
|
Maybe we can revert the changes to the readme where the linter added |
|
I've created PR #89 we can use as a launchpad for further improvements once this is one merged 🥬 |
|
Merged this into |
|
While at it I also renamed the |
Closes #87
Description
scrollingElementas seen from an anchor element (overflowing div, dialog,...)autoKillfeature working (cancel the scroll upon user interaction)I'm surprised how well this whole thing works! The "scrollend" event I'm using to dispatch the "scroll:end" hook doesn't work in safari just yet – but I've never actually used it, so I'd be fine with it being missing.
Checks
mainbranchnpm run lint)All tests are passing (OMG this plugin doesn't have any tests yet 😂npm run test)