4 ms·
> override some annoying mobile browser behaviors like zooming on an input. Yep, I've seen some people disable zoom in their webpages specifically to prevent S
by kijin 4y ago
> override some annoying mobile browser behaviors like zooming on an input.
Yep, I've seen some people disable zoom in their webpages specifically to prevent Safari from auto-zooming all over the place as the user moves from this to that input. It gets really annoying if you have anything but the simplest form. And what webpage doesn't have at least one form on it, even just the search box?
I fully agree with OP that disabling zoom is wrong. I also think it's wrong for browsers to mess with the zoom level without the user's instruction.
Almost every weird workaround we still have today in webdev was originally written to compensate for inconsistent browser implementation of some standard. In the past, IE was the one that always did something weird. Now it's Safari. Until browsers stop trying to pretend that they know better than both the developer and the user, somebody somewhere will keep writing these workarounds that then stick around in boilerplates and tutorials for years.
- freebreakfast 4y ago> Until browsers stop trying to pretend that they know better than both the developer and the user I don't think browsers or users are really the problem. Browsers are paving cattle paths. Users are stuck with what they get. Developers on the other hand. They're the ones who insist on using a document markup language to describe and build user interfaces.
- merrywhether 4y agoSafari only zooms if your input text is too small (less than 16px). The answer to defeating autozoom is to not make inputs that many people would need to zoom manually.
- kijin 4y agoDevelopers are usually not the ones who are making decisions like this. The manager doesn't want that annoying autozoom. The designer doesn't want to change the font size or page layout. There are also edge cases where something that was supposed to be 16px ends up being slightly smaller because of unit conversion and Safari zooms anyway. The developer, tired of this bullshit, googles a solution to satisfy everyone. Fortunately, there's yet another workaround for developers stuck in this situation. Drop "maximum-scale=1", but keep "user-scalable=no" in the meta viewport tag. Safari will ignore the directive and allow the user to zoom freely, but this somehow disables zooming on inputs. Makes sense, huh? One browser implementing a non-standard feature that doesn't even work consistently eventually hurts everyone, including the developer and the user. Just blaming the developer misses the larger problem.