Then pretty much everyone copied from these guides, and here we are. I remember I had used HTML5 skeleton templates for a while before I learned that the "maximum-scale=1, user-scalable=no" they came with is not a good idea.
Then pretty much everyone copied from these guides, and here we are. I remember I had used HTML5 skeleton templates for a while before I learned that the "maximum-scale=1, user-scalable=no" they came with is not a good idea.
I get why it's there, if you're building a PWA that is supposed to mimick a mobile app, you have to enable that to override some annoying mobile browser behaviors like zooming on an input.
The problem is that the above scenario is about the only time you would want to set the viewport in that way. Yet because the line gets included in boilerplates to make it easier to make PWA's, it ends up in a ton of stuff that definitely is not a PWA and should not have that.
<meta name="viewport" content="width=device-width, initial-scale=1">
Do you have links to examples of the major templates?
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.
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.
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.
Copy-pasting a template and just not being aware of accessibility and functionality requirements is most likely explanation here. Or devs being given 4k UHD monitors and never looking at their work on a small laptop.