Open susnux opened 2 months ago
It is a bit more problematic.
Making NcAppContent
a div
instead of main
solves the problem with main
inside main
. But it doesn't solve the root issue.
The structure should be
<div>
<nav />
<main />
<aside />
</div>
... and not
<main>
<nav />
<div />
<aside />
</div>
I think that it's better to go the opposite way.
Adjust layout.user.php
to replace that root <main>
with a <div>
. Then it works fine in Vue 2 and Vue 3 apps without any changes in components.
It may require adjustments on non-Vue apps, but:
main
is not so bad as having main
in main
<main>
in <NcAppContent>
at all.
With Vue 2 the
$mount
will replace the DOM node with the app, but with Vue 3 the app is rendered within the node. This causes problem in most cases, as the templatesuser
andpublic
will render<main id="content">
and apps are supposed to mount likeapp.mount('#content')
.This will cause a DOM like:
This is invalid: https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element
So we need adjust
NcAppContent
todiv
if mounted within amain
tag (conditionally because thebase
andguest
template do not provide amain
element).