clobba / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

document.getElementById() errors in IE9 Standards Mode for Non-Existent ID #616

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open any document which includes svgweb and is in IE9 standards mode (mode 
can be turned on in toolbar of IE9's built in dev tools)
2. in the console, enter document.getElementById('somejunk_adsfasd')

What is the expected output? What do you see instead?
null, but get an error

What version of the product are you using? On what operating system,
browser, and version of Flash?
IE9, svgweb LA

Please provide any additional information below. Reduced test cases are
always appreciated!

Original issue reported on code.google.com by joshua.p...@gmail.com on 24 May 2011 at 8:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think this is a highly critical bug. svgweb brokes the most of javascript 
apps with IE9.
Code to reprocuce, with IE9 in standard mode:
{{{
<html>
  <head>
    <script src="js/svgweb/src/svg.js" data-path="js/svgweb/src" data-debug="false"></script>
    <script type="text/javascript">
go = function() { alert(document.getElementById('Idontexist')); }
window.onsvgload = go ;
    </script>
  </head>
  <body >

  </body>

</html>

}}}

Original comment by emmanuel...@gmail.com on 22 Aug 2011 at 2:16

GoogleCodeExporter commented 9 years ago
I modified the compressed and uncompressed version to make this error go away. 
I didn't document it too well, but you can run a diff.

Works for me!

Files attached.

Original comment by joshua.p...@gmail.com on 22 Aug 2011 at 2:52

Attachments:

GoogleCodeExporter commented 9 years ago
Hello,
I have tried your patch, unfortunately it doesn't fix the code example above. 
The script still dies at getElementById call ( instead of popup "null" ).

The error console shows (sorry it's in french ):
Journal : Error while firing onload: L’objet ne gère pas la propriété ou 
la méthode « setProperty » svg-uncompressed.js, Ligne 443 Caractère 5

Original comment by emmanuel...@gmail.com on 22 Aug 2011 at 3:19

GoogleCodeExporter commented 9 years ago
Oh, but the compiled version seems to solve the issue...

Original comment by emmanuel...@gmail.com on 22 Aug 2011 at 3:26

GoogleCodeExporter commented 9 years ago
I believe the compiled patch also fixes issue 617. It's funny how deep the ID 
problem was. Maybe the maintainers are listening to this thread and can gain 
more insight form my hack-fix than I did.

Original comment by joshua.p...@gmail.com on 22 Aug 2011 at 3:30

GoogleCodeExporter commented 9 years ago
I would be very curious to have the clear patch and some explanations ! I've 
tried to debug myself but I must admit it is hard for me. Thanks for saving my 
app at short term . I hope mainteners will solve this problem for a more long 
term consideration.

Original comment by emmanuel...@gmail.com on 22 Aug 2011 at 4:01

GoogleCodeExporter commented 9 years ago
@Joshua: I downloaded your patched svg.js,
  and it solved this issue and issue 617 as well. Thanks!

(svg.js linked in your comment  
http://code.google.com/p/svgweb/issues/detail?id=616#c3 )

Original comment by kajmagnu...@gmail.com on 5 Feb 2012 at 2:52

GoogleCodeExporter commented 9 years ago
More anecdotal evidence, Joshua's patch solved issue 617 for me as well.

Original comment by alx...@gmail.com on 22 Feb 2012 at 12:18

GoogleCodeExporter commented 9 years ago
@joshua.p...@gmail.com . Can you please run a diff? Only the compressed version 
seem to works. Thanks a lot.

Original comment by s...@antistatique.biz on 1 Feb 2013 at 4:10

GoogleCodeExporter commented 9 years ago
Yeah in fact  svg-uncompressed.js  is the original one without modification..

Original comment by s...@antistatique.biz on 1 Feb 2013 at 4:16

GoogleCodeExporter commented 9 years ago
I took the compressed version and indent it automatically with my IDE. Now I 
get this diff and it should be quiet easy to rebuild the modification 
http://www.diffchecker.com/5Ck5gv91

Original comment by s...@antistatique.biz on 1 Feb 2013 at 4:21

GoogleCodeExporter commented 9 years ago
This working for me.

Original comment by s...@antistatique.biz on 4 Feb 2013 at 4:56

Attachments:

GoogleCodeExporter commented 9 years ago
Are there any updated releases to the project fixing this, and presumably other 
issues in the works?  The last one was from 2011.

Is this project dead? 

Original comment by AdamRac...@gmail.com on 12 Oct 2013 at 10:47