-
-
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
Class names aren't merged correctly when ...attributes
is specified first
#17692
Comments
Failing test: #17693 |
I tried to write a similar failing test in |
The order was actually intended to matter, though we do have a bug in class merging still (#17533 tracks that) which is what I think you are really reporting here. The idea was that you could use the location of For example, given these two possibilities: <div data-foo="inner" ...attributes></div>
<div ...attributes data-foo="inner"></div> With this invocation: <Foo data-foo="outer" /> We expect the location of <div data-foo="outer"></div>
<div data-foo="inner"></div> |
Also, RE: this working correctly in glimmer-vm, thats because the system doing the merging was overhauled in glimmer-vm but we haven't gotten Ember updated to the newer version (there were breaking changes, and its a bit of work to figure out what exactly is needed to do an upgrade). |
If it helps, this would also matter for |
@MelSumner - Good catch! I think we'll need a small RFC to tweak that behavior since the merged RFC explicitly states that
|
for attributes coming from ARIA, there are five whose value is an ID reference list (meaning, they can have one or more values):
|
👍 thank you for researching that! We should totally do an RFC to get those added to the "plz merge, don't clobber" list. During that RFC cycle we should try to see if there are other attributes like this that should be considered... |
This (the bug in the original thread) should now be fixed on canary and beta! |
There seems to be a difference in how attributes are merged depending on the position of
...attributes
within an element. The RFC doesn't seem to specify what the behaviour should be, I'm assuming that position shouldn't matter as otherwise it would likely be a source of confusion.With the following
Foo
component template:And the following invocation:
The result is:
update: After trying to write a failing test in glimmer-vm, it appears that the classes should be merged and the order will be different. The output should be:
The text was updated successfully, but these errors were encountered: