Skip to content

Commit

Permalink
prevented unexpected transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
MuzafferDede committed Jun 3, 2020
1 parent bd095df commit afb5b2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dist/alpine-ie11.js
Expand Up @@ -6202,6 +6202,8 @@


if (initialUpdate) {
// Asign current value to el to check later on for preventing transition overlaps
el.__x_transition_last_value = value;
return value ? showElement(el) : hideElement(el);
}

Expand Down Expand Up @@ -6237,7 +6239,7 @@
_newArrowCheck(this, _this2);
}.bind(this));
}
} // Asign current value to el to check later on for preventing transition overlaps
} // Asign current value to el


el.__x_transition_last_value = value;
Expand Down
4 changes: 3 additions & 1 deletion dist/alpine.js
Expand Up @@ -642,6 +642,8 @@


if (initialUpdate) {
// Asign current value to el to check later on for preventing transition overlaps
el.__x_transition_last_value = value;
return value ? showElement(el) : hideElement(el);
}

Expand All @@ -661,7 +663,7 @@
} else {
resolve(() => {});
}
} // Asign current value to el to check later on for preventing transition overlaps
} // Asign current value to el


el.__x_transition_last_value = value;
Expand Down
5 changes: 3 additions & 2 deletions src/directives/show.js
Expand Up @@ -9,6 +9,8 @@ export function handleShowDirective(component, el, value, modifiers, initialUpda

// Resolve immediately if initial page load
if (initialUpdate) {
// Asign current value to el to check later on for preventing transition overlaps
el.__x_transition_last_value = value
return value ? showElement(el) : hideElement(el)
}

Expand All @@ -29,8 +31,7 @@ export function handleShowDirective(component, el, value, modifiers, initialUpda
resolve(() => {})
}
}

// Asign current value to el to check later on for preventing transition overlaps
// Asign current value to el
el.__x_transition_last_value = value
}

Expand Down

0 comments on commit afb5b2b

Please sign in to comment.