If you scroll up and down fast then you see that animation has queued and will take some time to end. I think animation should be forced to stop before new has started.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hkirsman’s picture

Submitting pathc.

Please add my name to git log if you decide to implement this.

hkirsman’s picture

Or maby just FadeTo 0 should be stopped. Because if you scroll fast and it's a long page then fadeIn will pause until you stop.

Rudi Teschner’s picture

Patch is working and the artifact of the button caused by the fading doesnt appear anymore.

l.antonova’s picture

Good patch!

acke’s picture

Status: Active » Needs review

Thanks for the suggestion, here comes some feedback, better late than never as you say. I don't think the feeling in the animation gets good with the patch. But it's also not good that the animation flashes if you scroll up and down but a better aproach can be to just fade out on stop. Like this code:

      function backToTop() {
        if ($(window).scrollTop() > settings.back_to_top.back_to_top_button_trigger) {
          $('#backtotop').fadeIn();
        } else {
          $('#backtotop').stop(true).fadeOut();
        }
      }

  • acke committed 1c2fe5f on 7.x-1.x
    Issue #2383655 by hkirsman,acke: Fade animation will queue
    
acke’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.