In iOS 11.3 beta 1, panning and zooming the map results in incorrect behavior. Panning the map vertically scrolls the web page at the same time, whereas in previous versions of iOS, only the map would move (expected behavior.) In addition, zooming the map zooms the entire web page instead of zooming in on the Mapbox map.
Using Mapbox GL JS version 0.44:


@carvin I don't use beta, but have the same scroll with ios 11.2.5 on your website. When photo-carousel is set to display: none, the whole page stops scrolling. Maybe you have the same issue?
@bravecow Possible there's a separate issue on my site, so let's just use Mapbox's site as an example:


Ok, I've found a solution that works for my site. It feels hacky but it's getting the job done for now. I'm tracking when any touch begins and ends on the map canvas. If, while the user is interacting with the map, the page detects a "touch move" event on any element beside the map, I prevent that touch move from being registered.
Here's my workaround (using jQuery):
//Global var tracks whether map is being touched
var touchingMap = false;
//When the Mapbox canvas is touched, adjust the global tracking var
$(document).on("touchstart","canvas",function(e){
touchingMap = true;
});
//When the Mapbox canvas is no longer being touched, adjust the global tracking var
$(document).on("touchend","canvas",function(e){
if(e.touches.length == 0){
touchingMap = false;
}
});
//When any touch move event happens fire this:
$("*").on("touchmove",function(e){
//If the map is currently being touched, block any touch move event except those coming from the map.
if(touchingMap && !($(this).prop("tagName").toLowerCase() == "canvas")){
e.preventDefault();
}
});
This issue has been closed for just over a month, but it's not out on NPM. Is there any word on when the next release will be?
A v0.44.2 patch release fixing this issue is in flight now.
Most helpful comment
A v0.44.2 patch release fixing this issue is in flight now.