8000 bug: incorrect named slot dom order with `serializeShadowRoot: 'scoped'` components · Issue #6299 · stenciljs/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
bug: incorrect named slot dom order with serializeShadowRoot: 'scoped' components #6299
8104 Closed
@johnjenkins

Description

@johnjenkins

Prerequisites

Stencil Version

latest

Current Behavior

A nested component can position / order it's named slots incorrectly in the DOM:

Parent:

       <div>
          <cmp-child>
            <slot name="things" />
            <div class="AFTER">after</div>
          </cmp-child>

          <div>
            <slot />
          </div>
        </div>

Result:

Image

(the 'after' div moves before the slot (and therefore slotted nodes) in the DOM during hydration)

Expected Behavior

The original order of a named <slot /> should be preserved during hydration

System Info

Steps to Reproduce

  • pnpm i
  • pnpm build
  • pnpm express

Code Reproduction URL

https://github.com/johnjenkins/stencil-start-m6opf9rg/tree/incorrect-order-demo

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0