Hi. So, I have two pages where I have an SVG area that has its various png elements animated via GSAP, and that all is working great… except that on an iPad and iTouch, I am having issues, and I’m not really clear why.
Basically, the animation (SVG area) is not showing up. It’s taking up space, yet is visually not there.
At first, I thought ‘Apple doesn’t support SVG, I guess…’, yet one of the two pages DOES work on the iPad, and both are using the same technique.
Meanwhile, on my (old) iTouch, neither of the SVG displays are displaying (but, again, are taking up space on the screen… pushing the other content down).
So, Apple seemingly does support it (as the CanIUse website also confirms), since it DOES work on at least one of the devices (iPad) for ONE of the two pages.
So, my second theory was that the javascript that does the animation (GSAP) was starting up before all the graphics were loaded… which IS a thing.
But, I actually have coding already in place to combat that, so unless it’s not working, that can’t be it either. But, the theory is still sound, since both the devices where the failure occurs were using WIFI… and most likely slow WIFI at that. So, I’m still thinking the ‘animation script starting before all the graphics are loading’ theory is possibly valid… despite having the code in already to tell the browser to wait until the page is fully loaded before triggering the animation scripting.
I tried various other tests, but still am puzzled. It SEEMS like the SVG graphics themselves are not displaying at all, regardless of the animation that later moves them… making it seem like the SVG tag itself is not working… yet, again, one of the two (pretty much identically coded) pages DOES work on the iPad.
I know it’s all a bit vague and all, but does anyone have any theories or insights that might help me out here?
It works like a charm on my PC desktop, and apparently works well on some other devices (Mac laptop was one of them, I think). The only ones that are showing the ‘no visible SVG content’ are the iPad (although only in ONE of the two similar pages), and the iTouch (which fails on both, but it IS an old device).
Maybe the one common factor between these two devices is that both probably haven’t had an O/S update since purchase… so, that might be a factor.
Any other theories?
BTW, I was hoping to put a still image in place of the SVG animation, for those devices that fail to display it, but I’m not sure how to do that, as it would probably involve using absolute positioning, and overlaying it below the SVG element (in Z)… and that seems like a real mess. Not sure if there’s some way to code some sort of SVG support detection… Not really sure what is going on here, anyway.