Bug 133505 (change-use-target)

Summary: Changing the referred element of a SVGUseElement doesn't change the SVGUseElement
Product: WebKit Reporter: Christoph Werner <gonsfx>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Blocker CC: ahmad.saleem792, bfulgham, rniwa, sabouhallawa, Svenja100388, webkit-bug-importer, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://jsfiddle.net/gonsfx/vFChe/

Christoph Werner
Reported 2014-06-04 01:03:40 PDT
For my work on an SVG-based online editor for photo products i have to frequently swap out elements that are referred to by SVGUseElements. This does not work in any Webkit Versions i tried. On a contrary, Firefox and old Opera work fine. Steps to Reproduce 1) Open http://jsfiddle.net/gonsfx/vFChe/ It includes an inline SVG with a SVGUseElement that references the id 'target' and a SVGGElement which is set to display: none. An element with the id 'target' does not exist at the beginning. 2) Click SVG (grey background) Upon clicking the SVG, a new SVGPathElement with random dimensions and an id attribute of 'target' is created and appended to the (invisible) SVGGElement. Webkit correctly displays the SVGUseElement on the first click. 3) Click SVG again (grey background) Upon clicking the SVG another time, the existing SVGPathElement is removed from the DOM and a new, randomly dimensioned one is appended to the (invisible) SVGGElement. The SVGUseElement does not change. Actual Results SVGUseElement is updated/correctly drawn on the first click and doesn't change on any subsequent click. Expected Results SVGUseElement reflects the change of its referred Element on every click.
Attachments
Brent Fulgham
Comment 1 2022-07-15 16:55:46 PDT
Works in Chrome and Firefox. Fails in Safari.
Radar WebKit Bug Importer
Comment 2 2022-07-15 16:55:56 PDT
Ahmad Saleem
Comment 3 2023-07-14 01:50:29 PDT
Seems to work fine now in Safari Technology Preview 174. Might be fixed by https://github.com/WebKit/WebKit/commit/9057e67f74027a0a28d82230b35263cf724de030?
Note You need to log in before you can comment on or make changes to this bug.