Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

bug(modal) ngClass noticeably slow on modal open #5314

Open
sime opened this issue Jan 20, 2016 · 6 comments
Open

bug(modal) ngClass noticeably slow on modal open #5314

sime opened this issue Jan 20, 2016 · 6 comments

Comments

@sime
Copy link

sime commented Jan 20, 2016

I have a simple modal template that determines the CSS class of an element based on an hard coded controller value (version 1.1.0): http://plnkr.co/edit/tsNB1FbRryju9UFbtpLc?p=preview

The modal should show an element with a green background, but on initial load, the default state of red is visible for a brief moment on both desktop and mobile browsers.

This problem is not evident in v0.14.3: http://plnkr.co/edit/dA2ZjX3U9t1uummXV25t?p=preview

@wesleycho
Copy link
Contributor

Noting as a duplicate of #5298. This is caused by 1dbad8a .

@sime
Copy link
Author

sime commented Jan 21, 2016

It is evident in 1.0.x (albeit with other noise). I believe it is more linked to the $animate service.
742132a#diff-15d409302580c93c654a382e2da68396

@kirkchris
Copy link

We recently upgraded to 1.x from 0.14.x and are noticing a similar effect both on 1.1.0 and 1.0.3.

We use the openedClass property to apply a class to our body which blurs the body and hides the modal-backdrop. In previous versions the modals opened and displayed very smoothly, however now a backdrop very visibly appears in it's standard settings and then disappears to the blur. I've been able to stop the backdrop from appearing instantly by adding a class to hide it directly using the backdropClass property, but the blur still seems to jump in a bit, definitely more than before.

@sime
Copy link
Author

sime commented Feb 12, 2016

@kirkchris I'll feel like you are describing what is documented in #5298

Regardless if you could provide a plnkr with your workaround I would be interested.

@kirkchris
Copy link

@sime hmm, it's very possible the two are related, yes. I'll see if I can put something together, but my workaround wasn't really perfect. We ended up rolling back to 0.14 because even with the semi-fix it there was still a noticeable blink compared to 0.14.

@sime
Copy link
Author

sime commented Aug 15, 2016

I think this can be closed now?

Could someone else confirm that this commit solves the above mentioned behaviour:
1cbd73d

I have a demo with 2.0.1, and I do not see the flash of red.
http://plnkr.co/edit/MHuK7T6I62FkvPxYTtZP?p=preview

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

No branches or pull requests

4 participants