Skip to content

Selection's setBaseAndExtent() does not work crossing shadow boundaries #47117

Closed

Description

@webbedspace

Describe the bug:
See example

To Reproduce:

<!DOCTYPE html>
<span id="X">Light DOM</span> 
<span id="Y"><template shadowrootmode=open><mark>Shadow</mark> Root</template></span>
<script>
let s = document.getSelection()
s.setBaseAndExtent(X,0,Y.shadowRoot.firstChild,1)
</script>

Firefox
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 9, 2026
    3f0dfbe
  4. added a commit that references this issue on Oct 6, 2026
    02f6a7a
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