HTML5 canvas game on mobilesafari dimming on the tap

I am developing an html5-canvas game that works fine in most browsers, even mobile.

although on a safari mobile, if you click on the canvas, it gets a little darker - for example, if you click on any html element. I guess this is for selection purposes.

Is there any way to disable this dimming?

+3
source share
2 answers

There is usually CSS, you can use: -webkit-user-select: none;.

+2
source

I think that you see, indeed, a selection of the canvas object. You can try to hide the highlight color by setting alpha to 0.

* {-webkit-tap-highlight-color: rgba(0,0,0,0);}

+8
source

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


All Articles