[mapguide-users] Fusion Error - Chrome - Unable to preventDefault inside passive event

RenoSun renolionheart at gmail.com
Fri Apr 5 14:41:26 PDT 2019


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


More information about the mapguide-users mailing list