Hi there I made a website with the p5.js library https://p5js.org/ and it dosn't work nice on Safari 1 ) the star field I use for the loading screen get stuck everytime I get a callback of a loaded file 2 ) the onFocus isn't detected properly try it out http://rich.gg cheers
Thank you for the report! Would you be willing to isolate the issue further? At this point, it's unclear if this is a WebKit issue, a p5.js one, or a website one. > 1 ) the star field I use for the loading screen get stuck everytime I get a callback of a loaded file This sounds like expected behavior. Handling a callback on main thread blocks it, so there is nothing to drive the animation. Perhaps the concern is that it's blocked for too long? You can use Web Inspector timeline to see what's happening. 2 ) the onFocus isn't detected properly What is the symptom of this? Can you replicate with a small test case?
thank you for taking my report in consideration I think my problems sort of comes from the p5.js library but I'm writing here to find answers that will help p5.js work great on Safari - about the file loading call back it seems strange to me that I don't get that behavior from other broswers but if you say it is normal, then so be it - about the onFocus thing, I use the "focused" parameter https://p5js.org/reference/#/p5/focused of the p5.js library https://github.com/processing/p5.js As for reproducibility, If I open my site (rich.gg) on Safari on iPhone, I see my !focused page
We believe this site is behaving properly now. Can you confirm on iOS 15 or newer?