question

39285588 avatar image
0 Votes"
39285588 asked Prasad-MSFT answered

Viewport tag does not working on Android Teams WebApp

I'm tring to make task module that naviate url include viewport 'user-scalable=yes' on Teams WebApp.
I want to zoom out/in the page by pinch gesture.

It works very well on iOS phone, but does not work on android.

What can I do to work viewport 'user-scalable=yes' to pinch in task module on android teams webapp?

office-teams-app-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Prasad-MSFT avatar image
0 Votes"
Prasad-MSFT answered

Once try using 1 instead of yes for user-scalable:

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1">

It can be set to either yes or 1
The user-scalable property is translated into user-zoom with the following value translations.
- yes and no are translated into zoom and fixed respectively.
- Numbers ≥ 1, numbers ≤ -1, device-width and device-height are mapped to zoom
- Numbers in the range <-1, 1>, and unknown values, are mapped to fixed

Ref: https://drafts.csswg.org/css-device-adapt/#translate-meta-to-at-viewport
https://www.prestashop.com/forums/topic/367462-solved-viewport-dude-zoom-on-mobile-devices/

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.