Skip to content
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 js hooks not working on IE9 when using v-show #5525

Closed
mciesin opened this issue Apr 26, 2017 · 5 comments
Closed

Transition js hooks not working on IE9 when using v-show #5525

mciesin opened this issue Apr 26, 2017 · 5 comments

Comments

@mciesin
Copy link

mciesin commented Apr 26, 2017

Version

2.2.6

Reproduction link

https://jsbin.com/xuwivezeqi/edit?html,js,console,output

Steps to reproduce

  1. Surround an element with a transition component which uses js hooks.
  2. Use a v-show directive on the element.
  3. Toggle the visibility of the element using data passed to the v-show directive.

What is expected?

Appropriate hooks should be fired.

What is actually happening?

When using v-show, hooks are not fired on IE9.

@mciesin mciesin changed the title Transition js hooks not working on IE9 when using v-show or v-if Transition js hooks not working on IE9 when using v-show Apr 26, 2017
@zxc0328
Copy link
Contributor

zxc0328 commented Apr 27, 2017

CSS transition is not supported by IE9. So the hooks are not fired. You can checkout the source code here https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/directives/show.js#L34

Maybe it should be pointed out in Vue's Transition Effects documentaion. Or add a warnning in dev mode when using hooks in IE9.

@mciesin
Copy link
Author

mciesin commented Apr 27, 2017

So now we have an inconsistency with Transitions in IE9, because hooks were fired when I used v-if instead :)

@posva
Copy link
Member

posva commented Apr 27, 2017

It shouldn't matter though because these hooks are meant for animations purposes. You can, and should, move other logic to other hooks like created and beforeDestroy

@mciesin
Copy link
Author

mciesin commented Apr 27, 2017

As @zxc0328 noticed, it would be nice to point out in Vue's documentation that Vue's Transitions (not only browser-dependant CSS transitions) are not supported in IE9 . I've tried to use these js hooks only for animation purposes (I wanted to animate elements using js instead of transitions because CSS transitions are not supported in IE9) ;)

@smyth64
Copy link

smyth64 commented May 2, 2017

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants