-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX release] Fix classNames clobbering issue with AttrProxy. #12073
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Specifying `classNames` as a hash argument was previously stomping the concatenated property on the already created view when processing `attrs` in the `AttrsProxy`. This PR prevents us from stomping on any `concatenatedProperties` or `mergedProperties` while propagating `attrs` to `this`.
kicked sauce |
rwjblue
added a commit
that referenced
this pull request
Aug 13, 2015
[BUGFIX release] Fix classNames clobbering issue with AttrProxy.
Good stuff @rwjblue, thanks! |
rwjblue
added a commit
to rwjblue/ember.js
that referenced
this pull request
Aug 14, 2015
When `_propagateAttrsToThis` is invoked it iterates all properties that are present in `this.attrs` and calls `this.set(attrName, attrValue)`. This is normally exactly what you expect. However, in the case of `concatenatedProperties` and `mergedProperties` this `set`ing causes the concatenated / merged property to be completely clobbered. The fix introduced in emberjs#12073 adds a very simple work around for the internally known items (just hard coding things like `classNames`, `classNameBindings`, `attributeBindings`, and `actions`). This was obviously a very naive check, and leaves any external usages of `concatenatedProperties` in components/views completely hosed. --- The changes here introduces a __avoidPropagating property that we can use to prevent `concatenatedProperties` and `mergedProperties` from being set inside `_propagateAttrsToThis`. To avoid introducing this cost for every component created (when only classes can define new concatenated / merged properties) we are storing the `__avoidPropagating` on the constructor itself.
This was referenced Aug 17, 2015
rwjblue
added a commit
that referenced
this pull request
Aug 24, 2015
When `_propagateAttrsToThis` is invoked it iterates all properties that are present in `this.attrs` and calls `this.set(attrName, attrValue)`. This is normally exactly what you expect. However, in the case of `concatenatedProperties` and `mergedProperties` this `set`ing causes the concatenated / merged property to be completely clobbered. The fix introduced in #12073 adds a very simple work around for the internally known items (just hard coding things like `classNames`, `classNameBindings`, `attributeBindings`, and `actions`). This was obviously a very naive check, and leaves any external usages of `concatenatedProperties` in components/views completely hosed. --- The changes here introduces a __avoidPropagating property that we can use to prevent `concatenatedProperties` and `mergedProperties` from being set inside `_propagateAttrsToThis`. To avoid introducing this cost for every component created (when only classes can define new concatenated / merged properties) we are storing the `__avoidPropagating` on the constructor itself. (cherry picked from commit 98d7cf3)
rwjblue
added a commit
that referenced
this pull request
Aug 24, 2015
When `_propagateAttrsToThis` is invoked it iterates all properties that are present in `this.attrs` and calls `this.set(attrName, attrValue)`. This is normally exactly what you expect. However, in the case of `concatenatedProperties` and `mergedProperties` this `set`ing causes the concatenated / merged property to be completely clobbered. The fix introduced in #12073 adds a very simple work around for the internally known items (just hard coding things like `classNames`, `classNameBindings`, `attributeBindings`, and `actions`). This was obviously a very naive check, and leaves any external usages of `concatenatedProperties` in components/views completely hosed. --- The changes here introduces a __avoidPropagating property that we can use to prevent `concatenatedProperties` and `mergedProperties` from being set inside `_propagateAttrsToThis`. To avoid introducing this cost for every component created (when only classes can define new concatenated / merged properties) we are storing the `__avoidPropagating` on the constructor itself. (cherry picked from commit 98d7cf3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specifying
classNames
as a hash argument was previously stomping the concatenated property on the already created view when processingattrs
in theAttrsProxy
.This PR prevents us from stomping on any
concatenatedProperties
ormergedProperties
while propagatingattrs
tothis
.Fixes #12008
Fixes #12039
Fixes #12044
Fixes #12047
Fixes #12063