Skip to content

Define to remove selection range automatically if a selection range is modified into different selection root #175

Description

@masayuki-nakano

Related to whatwg/dom#772

Currently, Chrome and Firefox returns mutable reference of Range object from Selection.getRangeAt(). Then, the Range can be updated outside the DOM tree, e.g., into a different document, into a disconnected tree. I wrote a test, then, both Chrome and Firefox get same result.

I believe that Selection should not keep storing a range whose boundary points' root is not the document associated with the Selection because this kind of checks are done at Selection.addRange() at least.

Cc: @sefeng211, @smaug----, @zcorpan

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions