- From: Karl Dubost via GitHub <noreply@w3.org>
- Date: Fri, 17 Apr 2026 09:32:28 +0000
- To: public-svg-issues@w3.org
karlcow has just created a new issue for https://github.com/w3c/svgwg: == deselectAll() on SVGSVGElement Interface. == As currently defined in the SVG2 specification: https://w3c.github.io/svgwg/svg2-draft/struct.html#__svg__SVGSVGElement__deselectAll The deselectAll method is used to remove any selections from the document. When deselectAll() is called, all [ranges](https://www.w3.org/TR/2014/WD-dom-20140204/#concept-range) from the document's [selection](http://w3c.github.io/selection-api/#dom-selection) are removed and the [selection](http://w3c.github.io/selection-api/#dom-selection)'s [direction](http://w3c.github.io/selection-api/#dfn-direction) is set to forwards. [[DOM](https://w3c.github.io/svgwg/svg2-draft/refs.html#ref-dom)][[EDITING](https://w3c.github.io/svgwg/svg2-draft/refs.html#ref-editing)] This method is deprecated, as it duplicates functionality from the Selection API. This is equivalent to calling document.getSelection().removeAllRanges() on the document that this ‘[svg](https://w3c.github.io/svgwg/svg2-draft/struct.html#SVGElement)’ element is in. --- Testcase: [SVGSVGElement-deselectAll.html](https://github.com/user-attachments/files/26817903/SVGSVGElement-deselectAll.html) * * Safari and Chrome passes everything. * Firefox's `deselectAll()` simply doesn't clear the selection at all — rangeCount stays at 1 in every case. `deselectAll()` is a no-op instead of being equivalent to `document.getSelection().removeAllRanges()`. ⚠️ Question: * What should we do? Should we make it no-op in other browsers? * Should we send a message in the console to warn authors to use `document.getSelection().removeAllRanges()` instead. @longsonr @birtles for Firefox part. Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1095 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 17 April 2026 09:32:29 UTC