Skip to content
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

Snap.parse in IE 10 returns fragment without it's innerSVG #196

Closed
aghreed opened this issue Feb 24, 2014 · 7 comments
Closed

Snap.parse in IE 10 returns fragment without it's innerSVG #196

aghreed opened this issue Feb 24, 2014 · 7 comments

Comments

@aghreed
Copy link

aghreed commented Feb 24, 2014

The last step in the Snap.parse function before it returns a new fragment is to set the innerHTML of the temporary div to an empty string. For reasons unknown to me, IE keeps the reference to this temporary div which results in a returned fragment without the child elements of the string you passed in to parse.

Commenting out "div.innerHTML = E" (line 3148 in version 0.2.0) resolves the issue, however I'm unsure of the repercussions, if any.

@anwarjaved
Copy link

Yes,

I had the same issue, & commenting that line resolve the issue.

Thanks dabedur

@idflood
Copy link

idflood commented Aug 4, 2014

Thanks @dabedur this fixed the issue here too.

I also tried to store the new Fragment(f) in a variable before setting the innerHTML but it was not enough to fix the issue in IE.

One thing to note is that this bug is present in IE9 an 10 (didn't test on IE11).

@anwarjaved
Copy link

It also exists on IE11.

wookiehangover pushed a commit to wookiehangover/Snap.svg that referenced this issue Sep 16, 2014
* upstream/dev:
  Fix for pattern methods
  Fix regression from v0.2.0 when animating transforms
  Added toDataURL() methods to paper and element. Extracted element methods as module.
  Fixed adobe-webplatform#196
  Fixed issue with parse in IE
  Fix for Paper.use and new method Paper.symbol
  Fixed bug with clipPath having id and paper.use
  Fixed adobe-webplatform#280
  Moved class methods in to separate module and added docs for them
  Typo in dr.js comments
@kremio
Copy link

kremio commented Dec 13, 2014

I've just encountered the bug with mobile IE 10 (Lumia 920, Windows Phone 8.0) and the latest build of Snap (v 0.3.0).

I fixed it by adding a doctype to my SVG strings, as instructed in this stackoverflow question:
http://stackoverflow.com/questions/19924999/snap-load-external-svg-fails-to-load/19926605#19926605

@zetta83
Copy link

zetta83 commented Feb 3, 2015

This fix dont work in IE11

@ibrierley
Copy link
Collaborator

Can you post a jsfiddle.

@zetta83
Copy link

zetta83 commented Feb 3, 2015

danielr-minted pushed a commit to minted/Snap.svg that referenced this issue Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants