Open usb248 opened 7 years ago
@usb248 what you mean it's broken ? it works well here, any screenshot or console log from inspector ?
Yes, obviously
I mean, when the tooltip disappear, any scroll isn't triggered...
@usb248 ok it's kinda weird. But I don't have such environment (windows 10 + FF) to test it. But the error may be related to jquery based on your screenshot. Can you try to download Trip.js and use different version of jquery to give it a try ? thanks.
I just review the code and found at line 615:
if (this.settings.backToTopWhenEnded) {
this.$root.animate({ scrollTop: 0 }, 'slow');
}
The selector return for animate is the root of document which result with "body" element. I can summarized like below: $('html,body') works in chrome, firefox, safari. $('body') works in chrome and safari. $('html') works in firefox.
To make sure it works in most of the browser, the line should directly change like below:
if (this.settings.backToTopWhenEnded) {
$('html,body').animate({ scrollTop: 0 }, 'slow');
}
Same goes for line 1190:
this.$root.animate({ scrollTop: tripBlockTop - OFFSET }, 'slow');
should change to
$('html, body').animate({ scrollTop: tripBlockTop - OFFSET }, 'slow');
@EragonJ Would really appreciate if you could merge the above change and make a new release. Thanks.
On the demo page, this one is broken "Scoll to top when finished". Any scroll is trigger .... I'm on last FF Windows 10...