WebKit issues with event.layerX and event.layerY

What's going on!?

"jQuery probably copies those properties into the jQuery object." You're exactly correct, so it sounds like you already know! :)

Hopefully jQuery will update their code to stop touching that, but at the same time WebKit should have known better than to log a deprecation warning on an event (at least in my opinion). One mousemove handler and your console explodes. :)

Here's a recent jQuery ticket: http://bugs.jquery.com/ticket/10531

UPDATE: This is fixed now if you upgrade to jQuery 1.7.

Please note that if upgrading jQuery doesn't fix the issue for you it may have something to do with used extensions / plugins as Jake stated in his answer.


http://jsperf.com/removing-event-props/2

The temporary fix is to run this code before you do any event binding via jQuery:

(function(){
    // remove layerX and layerY
    var all = $.event.props,
        len = all.length,
        res = [];
    while (len--) {
      var el = all[len];
      if (el != 'layerX' && el != 'layerY') res.push(el);
    }
    $.event.props = res;
}());

UPDATE

See the latest performance tests to find out what the fastest way is to remove the event props.


The shortest solution to this is this one-liner:

$.event.props = $.event.props.join('|').replace('layerX|layerY|', '').split('|');

The enormous amount of these messages (I just got 80000 of them while using gmail) is indeed a bug in Chrome.

You should star the issue on Chromium.