Hammer.js: Firefox 47, Permission denied to access property "type"

Created on 15 Aug 2016  路  10Comments  路  Source: hammerjs/hammer.js

I see error logs in my sentry pointing to hammer.
Firefox 47 (always) on windows xp, 7, 10 and ubuntu
This is in production, minified, I've forgotten to enable sourcemaps, but it i traceable to library code:

Permission denied to access property "type"
// /assets/app/js/app.js in [96]</</<.handler at line 3:6296
!function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0) {snip}
u.removeChild(this),y.call(t)}}:function(t){setTimeout(s(y,t,1),0)}),e.exports={set:f,clear:d}},{"./_cof":17,"./_ctx":20,"./_dom-create":23, {snip}
{snip} own",Zt="mousemove mouseup";c(F,T,{handler:function(t){var e=Yt[t.type];e&Pt&&0===t.button&&(this.pressed=!0),e&At&&1!==t.which&&(e=Mt),this {snip}
}}(),f=h?this:document.createElement("a"),d=new r(l.search?l.search.substring(1):null);return d._url_object=f,Object.defineProperties(f,{hre {snip}

this traces to node_modules/hammerjs/hammer.js:804 at var eventType = MOUSE_INPUT_MAP[ev.type];:

inherit(MouseInput, Input, {
    /**
     * handle mouse events
     * @param {Object} ev
     */
    handler: function MEhandler(ev) {
        var eventType = MOUSE_INPUT_MAP[ev.type];

        // on start we want to have the left mouse button down
        if (eventType & INPUT_START && ev.button === 0) {
            this.pressed = true;
        }

        if (eventType & INPUT_MOVE && ev.which !== 1) {
            eventType = INPUT_END;
        }

        // mouse must be down
        if (!this.pressed) {
            return;
        }

        if (eventType & INPUT_END) {
            this.pressed = false;
        }

        this.callback(this.manager, eventType, {
            pointers: [ev],
            changedPointers: [ev],
            pointerType: INPUT_TYPE_MOUSE,
            srcEvent: ev
        });
    }
});

_UPD_

After enabling sourcemaps:

2016-08-18 21 22 23

Most helpful comment

Getting the same issue's popping up in our Rollbar
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:47.0) Gecko/20100101 Firefox/47.0

All 10 comments

Getting the same issue's popping up in our Rollbar
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:47.0) Gecko/20100101 Firefox/47.0

Getting same error, mine are OSX and Firefox 48

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:48.0) Gecko/20100101 Firefox/48.0

Are any / all of you by chance doing this inside an iframe or similar this looks like maybe an issue with accessing the wrong document

No iframes on the page in my case. https://www.voray.com

Still happening on Firefox 50 on Windows 10, no iframes involved either.

I am getting the same error. Always Firefox 50. Windows 7, 8.1, and 10. There are no iframes on the page.

It seems you've been using "advanced optimizations" from Google Closure. Hammer cannot work with it, due to (lot of) missing annotations.

@dascritch no

Any updates on this? It is still present in 2.0.8

We are seeing this too on washingtonian.com. We are not using Google Closure. There are iframes for our ads but they are not involved in our Hammer code.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

priyankaviswan picture priyankaviswan  路  5Comments

braco picture braco  路  10Comments

Shofol picture Shofol  路  3Comments

julmot picture julmot  路  9Comments

ghost picture ghost  路  10Comments