Ignored attempt to cancel a touchstart event with cancelable=false warning on click and drag events

4.1k Views Asked by At
Ignored attempt to cancel a touchstart event with cancelable=false,
for example because scrolling is in progress and cannot be interrupted.

I keep getting this error message when trying to click or drag the map. double tap works fine however.

sometimes it will let me drag the map, then ill get the message after a few seconds. After it starts coming up I can't get rid of it.

I'm using this [email protected] with leaflet 0.7.7 and ive tried with leaflet 1.0.0 also.

I've got two maps in my app, both on different controllers and different pages. (using ionic)

could that have something to do with it ?

        $scope.$on('leafletDirectiveMap.click', function(event, args){
            $log.log('click');
            $log.log(event);
            $log.log(args);
        });

im using this to catch the click event, but it doesnt seem to work either, it makes the above message appear when i click instead of responding to the event.

I can still tap on markers and their popups come up, and I can doubleclick zoom. just seems drag and click dont want to work properly.

if i remove the second map, i still get the same error on the first map.

my map setup

    $scope.map = {
        defaults: {
            zoomControl: false,
            tileLayer: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
            scrollWheelZoom: false,
            detectRetina: true,
            reuseTiles: true
        },
        center: {
            lat: -33.9337,
            lng: 151.1807,
            zoom: 14
        },
        events: {
            map: {
                enable: ['click'],
                logic: 'broadcast'
            }
        },
        markers: markers
    };

and in the html

<leaflet lf-center="map.center" defaults="map.defaults" height="calc(100% - 66px)" width="100%" markers="map.markers" id="map"></leaflet>
0

There are 0 best solutions below