Disable zoom on input focus in Android webpage

后端 未结 30 1267
日久生厌
日久生厌 2020-12-02 05:17

Here\'s the dilema, I have a webpage (only for android devices) and in that page I have an input box (a text box specifically) and when it gets focus the browser zooms in. I

30条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 06:01

    For anyone that is trying to stop zoom when trying to focus on a hidden input field, you can make the hidden input as big (or at least as wide) as the screen area(or viewable area) - this stopped it zooming.

    e.g.

    HIDDENinput.style.width = window.innerWidth;

    HIDDENinput.style.height = window.innerHeight; (optional)

提交回复
热议问题