Skip to content

Transition hangs if the transition is immediately cancelled #1116

@nkovacs

Description

@nkovacs

Fiddle: http://jsfiddle.net/nkovacs/eaf85xfa/

I think the transitionend event is not fired, since no transition happened.

Using a callback in enter and leave fixes it: http://jsfiddle.net/nkovacs/eaf85xfa/1/

But this has two problems:

  1. if the enter animation is cancelled, it still waits for the callback of component 1's leave animation before the second component can start animating in. The leave hook would have to take into account the elements current opacity and calculate the correct timeout. (e.g.: http://jsfiddle.net/nkovacs/mrfysga5/)
  2. If you click the button again, there will be two "Component 2"'s on the page, one leaving, one entering. Keep clicking it and you'll have several.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions