- From: Masayuki Nakano <notifications@github.com>
- Date: Wed, 03 Apr 2024 18:48:26 -0700
- To: w3c/selection-api <selection-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 4 April 2024 01:48:30 UTC
I wrote [a test](https://github.com/web-platform-tests/wpt/blob/0d75348206dc25ee759f46f94587ce86d81647a8/selection/selection-range-in-shadow-after-the-shadow-removed.tentative.html) to check the behavior of a selection range which is in a shadow DOM and after the host is removed. [Currently](https://wpt.fyi/results/selection/selection-range-in-shadow-after-the-shadow-removed.tentative.html%3Fmode%3Dopen?label=experimental&label=master&aligned), Chrome keeps the range as a selection range without modifying the range in the shadow. Firefox removes the range from `Selection` without updating the range. (It seems that Safari collapse the selection range to the removed node position, but the test fails at checking the stored range behavior.) I changed the Firefox's behavior as so for consistency with https://github.com/whatwg/dom/issues/1274 and https://github.com/w3c/selection-api/issues/175, but could be reasonable to make the selection range cloned (to avoid unexpected range update for the referrers of the `Range` object) and collapsed to the parent DOM tree (like as in the light DOM, i.e., like Safari). -- Reply to this email directly or view it on GitHub: https://github.com/w3c/selection-api/issues/168#issuecomment-2035976554 You are receiving this because you are subscribed to this thread. Message ID: <w3c/selection-api/issues/168/2035976554@github.com>
Received on Thursday, 4 April 2024 01:48:30 UTC