vue: Transitions don't work on Electron
Hello,
I am using Vue for my app and I packaged it as an Electron app. Unfortunately I noticed that the transitions weren’t working on Electron (while it is on Chrome or Safari).
I loaded the documentation page about Transitions on electron-quick-start (on Github) and most examples don’t work.
I am using a transition with a dynamic name in out-in mode. I tested on a Mac.
Any hint on why it doesn’t work on Electron?
Regards,
Romain.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
Commits related to this issue
- fix(transition): handle local-formatted floats in toMs function. (#8495) fix #4894 — committed to vuejs/vue by phablulo 6 years ago
- fix(transition): handle local-formatted floats in toMs function. (#8495) fix #4894 — committed to f2009/vue by phablulo 6 years ago
- fix(transition): handle local-formatted floats in toMs function. (#8495) fix #4894 — committed to aJean/vue by phablulo 6 years ago
After some while I found the problem:
floating point numbers on the object returned by Electron’s
window.getComputedStylecomes with a comma instead of a dot. Thus Vue will always parse it as 0 as we can see here.I submitted a PR to fix this.
@snapeuh Same issue on OS X 10.12.5. It works after adding a duration, e.g.
<transition name="fade" mode="out-in" :duration="350"> ... </transition>