svelte-scrollto icon indicating copy to clipboard operation
svelte-scrollto copied to clipboard

bugfix: adds scroll listeners for aborting

Open kindoflew opened this issue 3 years ago • 0 comments

This adds scroll listeners for aborting the animated scroll. I noticed when using this package that scrolling or clicking during animation didn't do anything and onAborting always ran after onDone, even if no scroll events fired.

In keeping with your inspiration for this, I used the same set-up as vue-scrollto (here and here.)

Here is a REPL with these changes that shows it working now: https://svelte.dev/repl/8d1798a853ba42988fee278a9bc29b36?version=3.35.0

Let me know if anything is off and I'll change it. Thanks!

Also, thanks for creating this! It's great!

kindoflew avatar Mar 27 '21 14:03 kindoflew