I made an HTML page that has an <input>
tag with type="text"
. When I click on it using Safari on iPhone, the page becomes larger (auto zoom). Does anybody know how to disable this?
Html – Disable Auto Zoom in Input “Text” tag – Safari on iPhone
htmlhtml-inputiphonemobile-safarizooming
Related Topic
- Javascript – Disable/enable an input with jQuery
- Html – How to create an HTML button that acts like a link
- Javascript – Selecting all text in HTML text input when clicked
- Html – Get the value in an input text box
- Html – How to “disable” zoom on a mobile web page
- Html – How to remove the space between inline/inline-block elements
- Javascript – How to get the value of text input field using JavaScript
- Javascript – Is Safari on iOS 6 caching $.ajax results
Best Answer
You can prevent Safari from automatically zooming in on text fields during user input without disabling the user’s ability to pinch zoom. Just add
maximum-scale=1
but leave out the user-scale attribute suggested in other answers.It is a worthwhile option if you have a form in a layer that “floats” around if zoomed, which can cause important UI elements to move off screen.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">