Remilp Posted September 3 Share Posted September 3 Hello community, On my website (mobile version) I would like to disable the ability of zoom-out or zoom-in. Do you guys have an idea of the code I need to lock this fonction ? Thanks ! Beyondspace 1 Link to comment
Beyondspace Posted Sunday at 02:26 AM Share Posted Sunday at 02:26 AM On 9/3/2024 at 11:06 PM, Remilp said: Hello community, On my website (mobile version) I would like to disable the ability of zoom-out or zoom-in. Do you guys have an idea of the code I need to lock this fonction ? Thanks ! Hey could you try adding this to header <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> `user-scalable=no` stops the zooming BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Remilp Posted Monday at 02:46 PM Author Share Posted Monday at 02:46 PM Hello Thanks for your answer but it still don't work 😕 @tuanphan maybe you have a solution ? Link to comment
Solution tuanphan Posted Tuesday at 11:24 PM Solution Share Posted Tuesday at 11:24 PM On 9/9/2024 at 9:46 PM, Remilp said: Hello Thanks for your answer but it still don't work 😕 @tuanphan maybe you have a solution ? Try this to Code Injection > Header <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <style> html, body { touch-action: pan-x pan-y; -ms-touch-action: pan-x pan-y; } </style> <script> document.addEventListener('gesturestart', function (e) { e.preventDefault(); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment