Skip to content

Selection's setBaseAndExtent() does not work with reordered slotted elements #47120

Closed

Description

@webbedspace

Describe the bug:
See example.

To Reproduce:

<!doctype html>
<div id="Z"><template shadowrootmode=open>rooted<slot name="b"></slot>rooted<slot name="a"></slot>rooted</template>
<span slot="a"><b id="X">slotted</b>slotted</span><span slot=b><i id="Y">slotted</i></span></div>
<script>
    let s = getSelection()
    s.setBaseAndExtent(X,0,Y,1)
    console.log(s+'')
</script>

Firefox and Chrome
Image
Servo
Image

Platform:
Win 10

Activity

  1. added
    C-untriaged
    on Aug 10, 2026
  2. added
    A-content/dom
    C-has-manual-testcase
    and removed
    C-untriaged
    on Aug 11, 2026
  3. added a commit that references this issue on Sep 11, 2026
    c4fbc94
  4. added a commit that references this issue on Oct 6, 2026
    5f5a074
  5. added a commit that references this issue on Oct 12, 2026
    f44e531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domC-has-manual-testcase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions