Open GoogleCodeExporter opened 9 years ago
I went looking at Modernizr to see if it also has to deal with the hidden
iframe problem. And it does:
https://github.com/Modernizr/Modernizr/commit/ef14ae79e7cd1e210b4529e646efd4ba1e
25b7e8
Modernizr just assumes the feature it is looking for doesn't work even though
it probably would work if the iframe wasn't hidden.
Original comment by scyta...@concord.org
on 18 Aug 2013 at 2:58
Here is one way to fix this problem:
https://github.com/concord-consortium/sketchily/commit/61df7c00356250dfeb2e4e1cd
6e220e9388f2da8
That is the same approach as what Modernizr does for the feature tests.
Additionally it uses a standard default for the units calculation since those
require getBBox which fails in the invisible iframe. With some basic testing
it seems like svg-edit works with just this change, but I'm pretty sure this
will cause something to be broken that I haven't found yet.
This next change makes it possible to re-run the feature tests after the iframe
is visible:
https://github.com/concord-consortium/sketchily/commit/5b4b2a52f1d33fe43288393d8
4a466e8d3d22ded
So then after the iframe is visible, svgedit.browser.checkFeatures() can be
run, and then after that re-initializing the units. If that is done, I don't
think anything should be broken in svg-edit.
Again I don't know if this is something you think should be in svg-edit or not.
If it is something you want, I can put together a patch for trunk.
Original comment by scyta...@concord.org
on 18 Aug 2013 at 3:07
Original issue reported on code.google.com by
scyta...@concord.org
on 16 Aug 2013 at 12:59