Bug 197147 - SVG textPath startOffset cannot be set smaller than 0% or larger than 100%
Summary: SVG textPath startOffset cannot be set smaller than 0% or larger than 100%
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL: https://codepen.io/nadieh/pen/PgaRQO
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2019-04-21 03:06 PDT by Nadieh
Modified: 2022-08-29 03:43 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nadieh 2019-04-21 03:06:35 PDT
In the provided Codepen example you can find a testcase that shows two SVG texts, placed on a path with a textPath. In (my) Safari it looks as if they have a startOffset of 0%. However the first is set at -10% and the second at 110%. Chrome and Firefox show the expected offsets.


(This came up while wanting to animate in an SVG text on a path. Setting the startOffset < 0% and animating this to > 0% gave the expected results in Chrome and Firefox, but not Safari)
Comment 1 Radar WebKit Bug Importer 2019-04-22 16:49:05 PDT
<rdar://problem/50112923>
Comment 2 Felix Niklas 2019-08-31 07:59:55 PDT
Just stumbled upon the exact same bug in Safari.
I built this testcase: https://felixniklas.com/bug_reports/safari-negative-startoffset/ and then realized that it's already been reported.
The testcase shows the behavior with 0%, 50%, -50% and a real-world example.
Comment 3 Ahmad Saleem 2022-08-29 03:43:39 PDT
I took the -50% startOffset broken Safari example from Comment 02 webpage and turned it into JSFiddle:

Link - https://jsfiddle.net/6s2dgpz8/show

All browsers (Chrome Canary 107, Firefox Nightly 106 and Safari Technology Preview 152) render it same and even Safari 15.6.1 as well.

While for real-world example:

JSFiddle Link - https://jsfiddle.net/sba96zuh/show

All browsers overlap the text while animating around box, Firefox is quite slow but it is something for Firefox to fix. But since all browsers are behaving as intended, I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!