Fusion Error - Chrome - Unable to preventDefault inside passive event

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fusion Error - Chrome - Unable to preventDefault inside passive event

RenoSun
Hi everyone,

Did anyone have this issue, and know how to fix it?

I got this error, when I am wheel zoom in/out using Chrome.

fusionSF.js?v=106:50726 [Intervention] Unable to preventDefault inside
passive event listener due to target being treated as passive. See
https://www.chromestatus.com/features/6662647093133312
preventDefault @ fusionSF.js?v=106:50726
stop @ fusionSF.js?v=106:50706
onWheelEvent @ fusionSF.js?v=106:72111
(anonymous) @ fusionSF.js?v=106:46647


Line: 50726
    /**
     * Method: preventDefault
     * Cancels the event if it is cancelable, without stopping further
     * propagation of the event.
     *
     * Parameters:
     * event - {Event}
     */
    preventDefault: function (event) {
        if (event.preventDefault) {
            *event.preventDefault();*
        } else {
            event.returnValue = false;
        }
    },

Line: 50706
    /**
     * Method: stop
     * Stops an event from propagating.
     *
     * Parameters:
     * event - {Event}
     * allowDefault - {Boolean} If true, we stop the event chain but
     *     still allow the default browser behaviour (text selection,
     *     radio-button clicking, etc).  Default is false.
     */
    stop: function (event, allowDefault) {

        if (!allowDefault) {
            *OpenLayers.Event.preventDefault(event);*
        }

        if (event.stopPropagation) {
            event.stopPropagation();
        } else {
            event.cancelBubble = true;
        }
    },

Line: 72111
        if (!overScrollableDiv && overMapDiv) {
            if (allowScroll) {
                var delta = 0;

                if (e.wheelDelta) {
                    delta = e.wheelDelta;
                    if (delta % 160 === 0) {
                        // opera have steps of 160 instead of 120
                        delta = delta * 0.75;
                    }
                    delta = delta / 120;
                } else if (e.detail) {
                    // detail in Firefox on OS X is 1/3 of Windows
                    // so force delta 1 / -1
                    delta = - (e.detail / Math.abs(e.detail));
                }
                this.delta += delta;

                window.clearTimeout(this._timeoutId);
                if (this.interval && Math.abs(this.delta) < this.maxDelta) {
                    // store e because window.event might change during
delay
                    var evt = OpenLayers.Util.extend({}, e);
                    this._timeoutId = window.setTimeout(
                        OpenLayers.Function.bind(function () {
                            this.wheelZoom(evt);
                        }, this),
                        this.interval
                    );
                } else {
                    this.wheelZoom(e);
                }
            }
            *OpenLayers.Event.stop(e);*
        }
    },




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Fusion Error - Chrome - Unable to preventDefault inside passive event

GordonL
I've seen this error when using XYZ layers.  

Steps to reproduce:
1. Using Maestro, add an XYZ layer (i.e. ESRI Satellite:
https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/${z}/${y}/${x})
2. In the Application (i.e. Aqua) turn on that XYZ Basemap
3. Using your mouse wheel, roll in and out.
4. View Javascript error:
/[ Intervention] Unable to preventDefault inside passive event listener due
to target being treated as passive. See
https://www.chromestatus.com/features/666264709313/

Definitely a bug.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Fusion Error - Chrome - Unable to preventDefault inside passive event

Benoit Begin
This also occurs with OpenLayers v2 out of the box. It's a Chrome specific
thing that appears mostly common with mouse-wheel events and it's tied to
them improving touch functionalities. There doesn't seem to be a clean way
of working around the issue at first glance.

It doesn't halt script exection, but it is kinda janky to have errors show
up in the console.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users