IPad canvas flicker when using

Trying to create a PhoneGap application using the canvas tag on an iPad. The animation works fine and fine, but every time you use the canvas, a blink appears.

The same thing happens on my iPad when I go to check out sites with a canvas tag, as well ...

Does anyone know how I can prevent this?

+4
source share
2 answers

Try using an event handler and prevent its distribution in the browser.

http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html

In my canvas application, to save the event from all browsers, I actually use everything that is available from event.stopPropagation (), event.stopImmediatePropagation (), event.preventDefault (), and then also returns a false handler. I can’t remember which platform is required, but the related document offers event.preventDefault () for Safari.

+2
source

This CSS bit fixed it for me:

<style> * { -webkit-tap-highlight-color:rgba(0,0,0,0); } </style> 

See also -webkit-tap-highlight-color: rgba (0,0,0,0); on a div?

+14
source

Source: https://habr.com/ru/post/1399292/


All Articles