-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Cannot read properties of undefined (reading 'cloneNode') #9109
Comments
If the ding id doesn't exist, why should this load successfully? It sounds like the svg is incomplete. |
Vue has been reported to cause problems |
not about Vue. just use js have same issue. https://codesandbox.io/s/quirky-https-nftvh4?file=/src/main.js |
it isn't loading correctly in 5.x either. |
Hi @asturur the browser can't render it I think this error cause by this line In my svg, xlink:href="#ding" access to ding id not exist so
Fabric5 and fabric6 still has this error In fabric 5, i check like that and see this passed error Hi @ShaMan123 You can try with link without use vue https://codesandbox.io/s/quirky-https-nftvh4?file=/src/main.js of @siaikin |
repro without vue and without dead files, we don't want to dig into your repro for 20 mins to understand a bug |
Clone fabric locally and run npm start vanilla Paste the reproduction in the app and trace the bug. |
For the sandbox, I had to add the following inside the sandbox loadSvgFromString function to prove the SVG would add to the canvas:
@ShaMan123 Also, side note, in order to use npm start vanilla, I had to navigate into .codesandbox\templates\vanilla and run 'npm -i --include=dev' first, otherwise it complained about open-cli not being installed. I'm not sure why this is since I basically found this inside the code to start but whatever. |
Did you run the cmd locally? If so it is because your user .npmrc is configured to have NODE_ENV=production |
CheckList
Version
6.0.0-beta10
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
18.0.0
Link To Reproduction
https://codesandbox.io/s/gracious-davinci-qvdr82?file=/src/App.vue
Steps To Reproduce
fabric.loadSVGFromString with svg content
I think this block cause error
xlink:href="#ding"
access to ding id not existHere is svg content
Expected Behavior
Svg load with successfully
Actual Behavior
Error Message & Stack Trace
The text was updated successfully, but these errors were encountered: