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] Transition Restores Pre-Transition Style Attribute (Which May Have Changed) #2402

Closed
stevekr opened this issue Jun 12, 2015 · 5 comments
Milestone

Comments

@stevekr
Copy link

stevekr commented Jun 12, 2015

If modal size changes before transition ends it resets to wrong position.

http://jsfiddle.net/0qyo8jqo/

I have empty .ui.loader div in modal while it loads remote content with unknown height so it usually makes modal change size before animation ends.

@hpohl
Copy link

hpohl commented Jun 12, 2015

You need to refresh it after changing content: http://jsfiddle.net/0qyo8jqo/1/

@jlukic
Copy link
Member

jlukic commented Jun 12, 2015

Technically observeChanges should cover you, but because the style attribute changed during transition restore conditions at the end of transition is restoring the style value before the transition started, which is incorrect.

Basically, as currently written transition will clear any style changes that happen during a transition, restoring the value to what it was before a transition was called.

I'm going to see if I can resolve this by recording changes to style caused by transition, and resetting them, instead of restoring style values after the transition.

@jlukic jlukic changed the title Wrong modal position if size has changed in transition [Transition] Transition Restores Pre-Transition Style Attribute (Which May Have Changed) Jun 12, 2015
@jlukic
Copy link
Member

jlukic commented Jun 12, 2015

Landed in 17eac47

Although I wouldnt recommend changing content during an animation...it is now possible.

@stevekr
Copy link
Author

stevekr commented Jun 12, 2015

Thanks!

@stevekr stevekr closed this as completed Jun 12, 2015
@jlukic
Copy link
Member

jlukic commented Jun 12, 2015

Example
http://jsfiddle.net/b9kgweo7/

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

No branches or pull requests

3 participants