prevent zoom for android

ساخت وبلاگ
Since viewport user-scaleable=0 has no effect with new versions of apple and android (and is complained by validators yet)

i've managed to solve it for apple IOS >=10 by using this javascript

PHP Code:

document.documentElement.addEventListener('touchstart', function (event) {
            if (
event.touches.length 1) {
                
event.preventDefault();
            }
        }, 
false);


But how to do for android? Still able to pinch zoom. SUCKS.

To all who goes "Well usabillity, there is a reason for this, blah blah", no. There is no reason for this. Good css / mediaqueries don't need to be zoomed.
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 161 تاريخ : جمعه 20 بهمن 1396 ساعت: 16:05