Rolando
Rolando

Reputation: 62674

Pinch to zoom on mapboxgl zooms in entire chrome window. How to prevent this?

I am using mapboxgl as a mapping inside of my website. When users attempt to zoom in using two fingers on a touchscreen, the map zooms in, but then the entire website zooms in too. How do I make it such that if user uses two fingers to zoom in on map, that it does not zoom in the entire webpage?

Upvotes: 0

Views: 298

Answers (1)

prasanth
prasanth

Reputation: 61

I had the same issue when developing mapbox app for a windows10 kiosk. This can be fixed my specifying touch-action as none for mapbox container div.

#map{
    touch-action:none;
}

Upvotes: 1

Related Questions