Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($animate): invalid CSS class names should not break subsequent elements #12725

Closed
wants to merge 2 commits into from

Conversation

petebacondarwin
Copy link
Member

The postDigest handler was not being added if the first element in
to modify the CSS classes contained invalid CSS class names. This meant
that subsequent valid CSS class changes were not being handled since we
were not then adding the handler for those correct cases.

Closes #12674

@petebacondarwin
Copy link
Member Author

Here is the Plunker showing the issue with the fixed version of Angular: http://plnkr.co/edit/Zux7ICpKvsh6oa25vlzr?p=preview

@petebacondarwin
Copy link
Member Author

The diff looks more complicated than it is.

I pulled two functions, updateData and handleClassChanges, from out of the addRemoveClassesPostDigest function.

This means that we are not having to recreate them on every call and also makes the addRemoveClassesPostDigest easier to grok.

@Narretz
Copy link
Contributor

Narretz commented Sep 1, 2015

Without the refactor, it would be easier to see what actually changed semantically, though ;)

@matsko
Copy link
Contributor

matsko commented Sep 1, 2015

LGTM. Excellent work.

@petebacondarwin
Copy link
Member Author

@Narrate you're right. I should have made two commits

@petebacondarwin
Copy link
Member Author

Here is the plunker with the most recent fix: http://plnkr.co/edit/ppS7j623Wz4DifRRBjtu?p=preview

@petebacondarwin
Copy link
Member Author

@Narretz - there I have broken the PR into two commits.

@Narretz
Copy link
Contributor

Narretz commented Sep 1, 2015

@petebacondarwin I almost don't dare to say it, but ... it's actually refactor, not refact.

@petebacondarwin
Copy link
Member Author

Doh!

@petebacondarwin
Copy link
Member Author

@Narretz shouldn't you be asleep?

…ements

The postDigest handler was not being added if the first element in
to modify the CSS classes contained invalid CSS class names. This meant
that subsequent valid CSS class changes were not being handled since we
were not then adding the handler for those correct cases.

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

Successfully merging this pull request may close these issues.

None yet

4 participants