5 ms·
> <meta name=viewport content="width=device-width,initial-scale=1"> This is a cat and mouse game. iOS 14 doesn't respect user-scalable=no or maximum-scale, unf
by dheera 6y ago
> <meta name=viewport content="width=device-width,initial-scale=1">
This is a cat and mouse game. iOS 14 doesn't respect user-scalable=no or maximum-scale, unfortunately.
What you need to do is this now, if you don't want the web browser to respond to scaling (and as much as the idiots at Apple love their high horses, there are actual use cases for this, including when you are building a webapp or when you are building a web page with your own pinch zoom logic):
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>body { touch-action: pan-x pan-y; }</body>
Basically, Apple tries hard to break HTML5 apps at every new iOS release.
- hvdijk 6y agoAre you surprised? If every damn website out there starts copying and pasting the same thing regardless of whether it makes sense, and it makes the iOS user experience worse as a result, of course they're going to change things. Their priority should be their users. It sucks for those that actually have a valid reason for it but there's no way to separate those automatically.
- dheera 6y agoThe problem is the OS zooming fights against pinch zooming that you may implement inside your webapp's logic, especially for non-static content (maps for example), multi-finger games where two touches don't signify a zoom, etc. They just broke the UX of a whole bunch of websites. When will we ever have HTML5 apps that match native apps? When they actually let HTML5 apps do what native apps do, like multitouch without triggering a default action.
- hvdijk 6y agoNo, that's not the problem. Remember, developers are a minority, users are the majority, so making things work well for users takes priority over making things work well for developers. When functionality that's useful for webapps is misused for websites where it has no place and where it breaks the user experience, the only way to improve things for users is to make things harder for developers.
- bryanrasmussen 6y agodevelopers make the things the majority use, if you make things worse for developers they have a harder time making things that work well for the user, when that happens they will look to misuse functionality to improve things for their users. The only way to improve things for users is to make things easier for developers.
- hvdijk 6y agoThere are good developers who try to improve things for their users. There are also many developers who don't and ruin it for the rest.
- KingOfCoders 6y agoDo they earn 30% from HTML5 apps?
- sgc 6y agoThe OS or browser should not just take over one of the primary means of interacting with an app and effectively disable it for any other use. You might as well just pull those gestures out of the specs at that point. The point of an os or browser is to get out of the way, not be omnipresent. It's extremely patronizing and cripples important functionality for likely millions of sites.
- anoncake 6y agoThe browser is the app.
- sgc 6y agoThe web app is the app. A browser is a mini OS at this point.
- anoncake 6y agoThat's what web devs like to pretend. Then they are surprised when browser developers continue developing their browsers. If you want to develop an app, develop an app, not a website. Use Electron or its mobile equivalents if you must.
- sgc 6y agoSo you are saying that pinch and double tap should just be removed from js specs because one company arbitrarily decided you can't use them anymore. Whatever. Also, MS office and Adobe are web apps and far more complex than almost any "real apps" out there. It's completely untrue that web apps are not apps.
- anoncake 6y agoNo, I think JS as a whole should be removed completely independently of what any company decided. Websites in general aren't trustworthy, which means they can't be trusted to determine the browser's behaviour. > Also, MS office and Adobe are web apps and far more complex than almost any "real apps" out there. It's completely untrue that web apps are not apps. You can pretend they are until someone takes away your toys. Then, suddenly, your "app" cannot even process its own input. Or access the clipboard. Or do any of the other things that websites just aren't trustworthy enough for.
- KingOfCoders 6y agoAt what point do they think my English "makes the iOS user experience worse" and change the text between two <div>s?
- ericbarrett 6y ago> iOS 14 doesn't respect user-scalable=no Best change made in Safari in a long time. My eyesight is going and unzoomable websites were a serious accessibility issue.
- dheera 6y agoAt the same time, they created accessibility issues on lots of other websites. Games that need multitouch, photo galleries that implement their own pinch zoom and progressive higher res image loading logic, and lots of other things.
- anoncake 6y agoThen websites just cannot use that feature. Zoom is necessary for accessibility, period. Being able to implement games as websites isn't. If you want to control the UI, write an app.
- maple3142 6y agoBut not everyone wants to give money to apple to be able to deploy their apps, so the "sensible" way is to use hacks[1] to have a normal html5 behavior. [1]: https://stackoverflow.com/q/37808180/6885801 https://stackoverflow.com/q/37808180/6885801
- Spivak 6y agoI'm sympathetic to the argument that you shouldn't have to pay to play on iOS devices but that doesn't mean that the browser has to cater to every possible use-case especially when that use-case hurts accessibility for almost all real web pages if used. If you give web developers any way to disable zoom they will disable zoom whether it's appropriate or not. With an app that gets human reviewed you can make rules like "this feature can only be used for full-screen games" but not on the web where there's one set of rules for everyone.
- 6y ago
- austinjp 6y agoThanks for this, is it backwards compatible with previous versions of iOS? Or is there some combination of incantations that does graceful degradation?
- pjc50 6y agoPerhaps one of those features which should have been made a toggle, but yes: pinch-zoom is an essential feature which all sorts of sites were disabling for no good reason, and so this toy gets taken away from everyone. This kind of tragedy of the commons stuff is why we can't have nice things on the web.