From 7daaba50ca72b3755451d5695bb07f2ecd15b60a Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Wed, 11 Apr 2018 23:01:22 +0200 Subject: [PATCH] fix: remove position reset of Orbit slides preventing the "full-absolute" new behavior All Orbit slides should always have an `absolute` positioning to prevent jumping Orbit slider (see #11107). The `'position': 'relative'` reset is no longer necessary here and break the Orbit behavior as inline styles overrides `.orbit-slide` class styles. See: * https://github.com/zurb/foundation-sites/pull/11107/commits/dbdae96312bcccd0820d8ee43c088d5d6a1fab14 * https://github.com/zurb/foundation-sites/pull/11107 --- js/foundation.orbit.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/foundation.orbit.js b/js/foundation.orbit.js index 8901c6b4e..41ef15f27 100644 --- a/js/foundation.orbit.js +++ b/js/foundation.orbit.js @@ -149,8 +149,9 @@ class Orbit extends Plugin { temp = this.getBoundingClientRect().height; $(this).attr('data-slide', counter); - if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {//if not the active slide, set css position and display property - $(this).css({'position': 'relative', 'display': 'none'}); + // hide all slides but the active one + if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) { + $(this).css({'display': 'none'}); } max = temp > max ? temp : max; counter++; -- 2.47.2