-
Notifications
You must be signed in to change notification settings - Fork 14
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
Transition end event doesn't always fire #4
Comments
I also noticed that transitionEnd and transforms are only implemented for webkit (which makes sense considering this is aimed at mobile apps). Completely up to your discretion, but this is how I (very hastily) patched this to support latest IE and Firefox (inserted at L216 before assigning
edit: some issues with IE11 reporting as "Mozilla" in |
Nice! Could the prefix be set when checking for the existence of the various transition names? |
Not sure what you mean? |
When you're setting the prefix you check the browser object (i.e. For example, instead of checking |
Yeah I guess you could. Didn't find a specific function for it in either Modernizr (Modernizr.prefixed returns a prefixed js-version of css properties, not just the prefix), and wanted some control over it, but I guess this should be fairly easy to write. |
Check out how leaflet does it: https://github.com/Leaflet/Leaflet/blob/master/src/dom/DomUtil.js#L172 and I wrestled with transitionEnd not firing the whole last week. I worked around it by adding a small random number ( |
Thanks @fab1an, adding 0.0001 to |
Here's a solution that I used: because modern browser support multiple background images, you can randomly position a single pixel base64 encoded transparent gif. Every update of the Elements.style repositions this transparent gif. Helpful if you want to always trigger transition without visible change to the element.
|
If the animation has no effect, `onTransitionEnd`'s handler is not be called. Since `onTransitionEnd`'s handler controls whether the terminal is shown or not (by passing `connect=true` as a Terminal prop), set the `animated` variable to true after a timeout. Please see: * https://stackoverflow.com/questions/2087510/callback-on-css-transition/11354026#11354026 * scttnlsn/backbone.viewkit#4 * https://forums.xamarin.com/discussion/58456/why-isnt-my-transitionlistener-getting-called
If the animation has no effect, `onTransitionEnd`'s handler is not be called. Since `onTransitionEnd`'s handler controls whether the terminal is shown or not (by passing `connect=true` as a Terminal prop), set the `animated` variable to true after a timeout. Please see: * https://stackoverflow.com/questions/2087510/callback-on-css-transition/11354026#11354026 * scttnlsn/backbone.viewkit#4 * https://forums.xamarin.com/discussion/58456/why-isnt-my-transitionlistener-getting-called
If the value of the transition property does not change the transition end event does not fire. Use a setTimeout to ensure that an end event is always triggered.
The text was updated successfully, but these errors were encountered: