From 7b95088338998b1ba39e1ecdf3f2450b5ddff385 Mon Sep 17 00:00:00 2001 From: George Date: Wed, 18 Dec 2013 16:35:41 +0000 Subject: [PATCH] Fix bug where joyride fails to scroll up for next tip If the next tip is higher on the page than current tip a negative tipOffset results in joyride not scrolling to show position of the next tip. This commit fixes that behaviour by scrolling unless tipOffset is 0 which I assume is intended behaviour --- js/foundation/foundation.joyride.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/foundation/foundation.joyride.js b/js/foundation/foundation.joyride.js index f7140aab9..a62fdde71 100644 --- a/js/foundation/foundation.joyride.js +++ b/js/foundation/foundation.joyride.js @@ -390,7 +390,7 @@ window_half = $(window).height() / 2; tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()); - if (tipOffset > 0) { + if (tipOffset != 0) { $('html, body').animate({ scrollTop: tipOffset }, this.settings.scroll_speed, 'swing'); -- 2.47.2