Zooming in on Android web sdk

Hey all, got an update from the team on this. It happens when a mobile browser detects on a tap event that the form needs to be zoomed in for the customer:

  • Could be too large or a non-responsive page

  • Could be font size is too small (16px or 18px is baseline)

  • We’re 16px

It can be solved by adjusting page size, or disabling zooming with a viewport change or style change.

  • Viewport change will need to be from the base of your website.

  • Setting the style of the iframe body or input to touch-action:none stops the issue (Disable’s swipe zoom and touch zoom)

We recommend:

  1. Add maximum-scale=1 to your viewport.

  2. Ex. Add <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1 ">

  3. This will disable all zooming (or limit it depending on the maximum-scale value)

  4. Add a style touch-action: none to the container that holds the SDK iframe

  5. Ex. <div class="sq-container" style="touch-action: none"> Iframe_rendered_here </div>

  6. This will disable swipe zoom and touch zoom on this element. Better than disabling it on the whole page.

  7. Adjust the web page to a more responsive width and height styling. :slightly_smiling_face:

1 Like