How can I disable zoom when an element isn't visible?

While there’s a certain group visible, I want users to be able to zoom in and out. But when it’s not, I want to disable it.

The option in the General tab under settings where you can enable/disable zoom doesn’t really work because it talks about the entire page in general at all times. I want to have zoom disabled in general, yes, but I want it to be enabled when a certain group shows.

Is there a way for this? I saw some options as well somewhere in other threads suggesting code in the script headers under settings but that’s the same thing as always disabling or enabling it, or I don’t know how to edit the code.

1 Like

Is there a specific reason you don’t want them to zoom that could be accomplished another way? Depending on browsers and work arounds I dont think you’ll really be able to fully stop someone zooming in if they want.

It’s mainly for mobile use because things will get weird and look bad/get confusing for some users if you zoom out and you have a desktop version for mobile. I had this disabled and it kept users on mobile from zooming out and getting a weird UI, but it happens that I now have a group where I want the zooming out to happen and for that the only way right now is to disable it altogether, which makes zooming out on the home page terrible now as I don’t want it to happen altogether :frowning: I don’t know if alternatively I could enable zooming in and out of the group itself irrelevant to the page? That’s mainly why.

1 Like

Oh I see, that makes complete sense.

Within the page you could add css to the header to disallow zooming, you can make that conditional, so you’d put in like if Y box is visible, format as text, then have the css to make it non zoom if visible or empty if not visible etc.

does that make sense? Ill send you a screenshot of what I mean when im back at my desk

This method works, you would just need to show or hide that element you’re talking about through url routing rules, should work for your use case?

Screenshot 2024-02-06 081931
Screenshot 2024-02-06 082518

1 Like

I’m not sure where do you find this? I know of here, when you click the index, it gives you this option but I don’t know how to work with this or what url routing rules are lol. But you give me an idea, perhaps I can put this in an HTML element and have it work when the group is visible? ! :slight_smile:

Captura de pantalla 2024-02-05 154702

1 Like

Thank you for providing this, I’m going to give it a try

1 Like

On each page, like the index page, you can add additional content into the html header, I believe this one would need to be in the header so html container within the body probably wouldn’t function. But send me a DM and I can screen share with you, shouldnt take more than a few minuites to show you.

This topic was automatically closed after 70 days. New replies are no longer allowed.