-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not animations in Firefox 124 #23
Comments
Yes you"re right. I am having this issue as well since I updated my browser yesterday (as I mainly use Firefox). From I quick debug, I think they changed the default transition string returned by It will be fixed before today"s evening. In the meanwhile, you can workaround this bug by manually adding a transition to <Collapse class="Collapse"> .Collapse {
transition: height 200ms ease-out;
} |
Ah I see, this is indeed it. Thank you very much for the prompt answer and for the solution. That"s how I fixed it: diff --git a/packages/vue-collapsed/src/utils.ts b/packages/vue-collapsed/src/utils.ts
index 5642331..8bd49e9 100644
--- a/packages/vue-collapsed/src/utils.ts
+++ b/packages/vue-collapsed/src/utils.ts
@@ -15,13 +15,26 @@ export function getHeightProp(el: RefEl) {
}
}
+let defaultTransitionValue: string | undefined;
+function getDefaultTransitionValue() {
+ const tempElement = document.createElement("div");
+ document.body.append(tempElement);
+ const result = window.getComputedStyle(tempElement).transition;
+ tempElement.remove();
+
+ defaultTransitionValue = result;
+ return result;
+}
+
export function getTransitionProp(el: RefEl) {
if (!el.value) return {}
const { transition } = getComputedStyle(el.value)
// If transition is not defined, return the default one
- if (transition === "all 0s ease 0s") return { transition: DEFAULT_TRANSITION }
+ if (transition === (defaultTransitionValue ?? getDefaultTransitionValue())) {
+ return { transition: DEFAULT_TRANSITION }
+ }
return { transition }
}
|
Fixed in v1.3.1 |
Hello.
In Firefox Developer Edition 124.0b7 (all extensions are disabled), the collapsible list started to open and close instantly, without any animations. You can check that on the Vue Collapsed site: https://vue-collapsed.pages.dev/. This does not happen in Firefox 123 or Chrome 122. That said, I only want to make you aware of that - I don"t think there is something necessarily wrong with
vue-collapsed
: after a quick debugging I noticed thattransitionend
event no longer fires, which causes this behavior. The root cause might be a bug in a new Firefox or Vue.The text was updated successfully, but these errors were encountered: