At the moment the newest iOS (14.4) will still zoom on any input box that takes focus, unless you use 16px on the input without the focus.
This alone isn't a problem, but when focus is removed from that input box - the scaling remains and destroys the appearance of the page.
Viewport tag in main single page is fine:
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
The react code:
render() {
return (
<div className='my-form' style={this.props.style}>
<h3>MyForm</h3>
<div>
<input
{...InputGetterSetter(this, 'text')}
placeholder="Please enter text"
onKeyDown={this.onKeyDown.bind(this)} />
</div>
The SASS-defined css:
.my-form {
width: 100%;
height: 100%;
text-align: center;
@media screen and (-webkit-min-device-pixel-ratio:0) {
select,
textarea,
input {
font-size: 16px;
}
}
input {
width: 66%;
text-align: center;
}
.bottom-button {
background-color: #00ac69;
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 150px;
outline: none;
border: none;
overflow: hidden;
}
}
.keyboard-expanded {
.my-form {
.bottom-button {
height: 60px;
.ion-ios-telephone {
font-size: 22pt;
}
}
}
}
.dark {
.my-form {
input {
color: white;
}
}
}
It is possible to prevent zooming in the first place by setting the font size, but what if we want the zooming but just for it to unzoom? Is this possible?