'event.layerX and event.layerY are broken and deprecated in WebKit.' Errors

后端 未结 3 1600
不知归路
不知归路 2021-02-19 01:46

I just updated Chrome to version 16.0.912.63 and now I get hundreds of errors using jQuery 1.7.1. Seems to fire whenever the mouse is moved...

event.layerX and e         


        
3条回答
  •  无人及你
    2021-02-19 02:33

    add js to js file footer:

    (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;
    }());
    

    you can try it.

提交回复
热议问题