Fix duplicate Page root element id #554
Closed
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.
Issue:
Matestack by default renders two Page root elements, both containing a child
div
with thev-if
directive, for instructing Vue.js on wether or not rendering the child element:This used to be a non-issue, but now we've added an
id
attribute to the Page's root element, containing both the controller and the action, as we can see in the example above.Although it doesn't appear to cause any actual problem right now, we cannot guarantee it won't cause in the future.
Also, it's not compliant with the HTML spec, which dictates the
id
attribute must be unique.Changes
div
s containing thev-if
directive.Notes
matestack-ui
, which is added to both Pages and Apps. Since Apps can wrap Pages, we can have the situation of two elements with the very sameid
attribute. This PR does not fix this other issue, but I'll start a conversation with the maintainers about that.