Skip to content

Commit

Permalink
fix: always use absolute positioning to prevent jumping Orbit slider
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRuf committed Mar 29, 2018
1 parent 571ba89 commit dbdae96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/foundation.orbit.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,10 @@ class Orbit extends Plugin {

if (this.options.useMUI && !this.$element.is(':hidden')) {
Motion.animateIn(
$newSlide.addClass('is-active').css({'position': 'absolute', 'top': 0}),
$newSlide.addClass('is-active'),
this.options[`animInFrom${dirIn}`],
function(){
$newSlide.css({'position': 'relative', 'display': 'block'})
.attr('aria-live', 'polite');
$newSlide.attr('aria-live', 'polite');
});

Motion.animateOut(
Expand Down
1 change: 1 addition & 0 deletions scss/components/_orbit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ $orbit-control-zindex: 10 !default;
/// Adds styles for the individual slides of an Orbit slider. These styles are used on the `.orbit-slide` class.
@mixin orbit-slide {
width: 100%;
position: absolute;

&.no-motionui {
&.is-active {
Expand Down

0 comments on commit dbdae96

Please sign in to comment.