Search code examples
iosloadingkonvajskonva

Konva stops working on iPhone after three pages?


First time poster and extremely amateur website maker here.

I made this test site with Konva: https://snuck.in/test/pink

You can tap the square to go to the next page.

It works fine on an old iPhone 5 (iOS 10.3.4). I'm able to tap through endless pages.

When I try it on an iPhone 7 Plus (iOS 13.1.3), I can only tap through three pages and then they start coming up blank. I get the same result in any browser: Safari, Chrome, Firefox, Opera Touch.

Any idea why it would work for three pages and then quit?

Let me know if I can provide more information. Thanks a lot!


Solution

  • Looks like there is the issue with memory leaks in Safari. After several reloads it showed me that the memory is over. It didn't fully clear canvas from memory.

    As a workaround you may try to make stage smaller and destroy it BEFORE reload:

    box.on('click tap', () => {
      stage.width(1);
      stage.height(1);
      stage.destoy();
      location.href = 'pink';
    })