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

后端 未结 3 1620
不知归路
不知归路 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:27

    In my case it was the Chrome extension "Search by Image (by Google) 1.1.0"

    Nothing to do with my application.

    Disable it and you'll be free of these annoying errors.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-19 02:41

    You should only worry about this if it is:

    • your website and
    • you are planning to upgrade jQuery to a version > 1.7 in the future and
    • you are using layerX and layerY all over the place

    The message is just telling you that those two properties are deprecated (at least in Webkit) and will be removed from jQuery in the near future.

    0 讨论(0)
提交回复
热议问题