MRchildNEO / svgweb

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

onsvgload event not fired on Opera native mode with clear cache #599

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
From Michael Neutze in the SVG Web User Google Group:

I am seeing some timing issues in _Opera_ 10.6 and 11.0 where the
onsvgload event (sitting in the body tag) of a page that loads svg via
the object tag is not firing on the first load of the page (cold
cache).

Using SVG Web r1309: Map needs a second manual reload until data is displayed

http://vis.uell.net/st/11/atlas.html
(onsvgload event sits in the body tag)

Using HTML5 version without SVG Web: data is loaded (=map is colored)
immediately

http://vis.uell.net/st/11/_atlas5.html
(onload event sits in the object tag)

The above examples work fine in all other browsers.

From Rick Masters:
I reproduced this problem by installing Opera 11 on Windows XP. I could not 
reproduce it with Opera 10.63 on Mac OSX 10.4.

Original issue reported on code.google.com by grick23@gmail.com on 31 Dec 2010 at 8:59

GoogleCodeExporter commented 8 years ago
Test files in r1314.

Original comment by grick23@gmail.com on 31 Dec 2010 at 9:05

GoogleCodeExporter commented 8 years ago
I believe this is a bug in Opera but it may be difficult to isolate further.

I implemented a workaround in r1315.

Issue 599 - Opera 11 on Win XP (and other reported versions) does
not fire the object listener for objects in markup if the cache is clear.
It was found that if you have an onload="..." listener in the object
markup, the load event is fired. So, the workaround is only
used when there is no such handler in place.
The workaround is to remove the object from the DOM and append it
back to the page. This appears to "reactivate" the object so the load
event is fired.
Since this is potentially disruptive, care is taken to do this
only for Opera and to make sure the object is added back in the proper
position. If this workaround causes a problem for you, try
adding onload="" to your object markup which is less disruptive.

Original comment by grick23@gmail.com on 31 Dec 2010 at 11:45

GoogleCodeExporter commented 8 years ago
Just for posteriy or if someone from Opera wants to look into it: The mapping 
example that shows the described behaviour of this issue up to r1309 is 
available here
http://vis.uell.net/st/11/atlas_opera_issue_r1309.html

the first version with the above fix is available at 
http://vis.uell.net/st/11/atlas_opera_workaround_r1316.html

since I moved all the examples on the production site to a later revision now

Original comment by mneu...@gmail.com on 9 Jan 2011 at 10:26