lundi 29 décembre 2014

Is canvas supposed to re-render each time the screen adjusts on iPhone browsers such as Safari and Chrome?

I built a web app meant to be both mobile and desktop friendly. It uses PDF.JS to display a PDF file, and as I've developed the app further, all in a sudden when testing it on my iPhone, the canvas has begun to freak out (displaying the items from the PDF in the wrong places or even the entire content upside-down) when I swipe the screen.


Every time I swipe the screen (scroll) at all on these mobile browsers, the canvas is re-rendered.


I understand this likely has to do with the plugin used to render the PDF, but I'm trying to figure out how the canvas would be affected by me scrolling / swiping, without any listeners to act on those events.


On desktop it works fine. One Chrome and Safari (on iPhone) the canvas "freaks out" in slightly different manners.


Does canvas re-render each time the screen adjusts on iPhone browsers such as Safari and Chrome?


I don't expect anyone to solve this weird problem, I'm just trying to understand what could be the possible causes / sources of the behavior so I can optimize to avoid the problem myself.




Aucun commentaire:

Enregistrer un commentaire