Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery 1.7 is *still* returning the event.layerX and event.layerY error in Chrome

What am I doing wrong? Am I misunderstanding the problem or is it something else entirely?

On my page I was using jQuery 1.6.4 from the Google CDN. This would, of course, generate the error:

event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

I read here that jQuery 1.7 removed this issue. However, after updating my application to 1.7, I'm still seeing it. I'm using the Microsoft CDN until Google put the link up.

Things I've tried before posting this:

  • Clearing the browser cache
  • Changing back to jQuery 1.6.4 (still happens - obviously)
  • Using jQuery 1.7-specific code to make sure 1.7 is actually being loaded - .on() works fine when I use 1.7 but obviously gives undefined errors with 1.6.4 - I thought this should prove 1.7 is actually running
  • Commenting out and removing all other Javascript from my application - everything except for jQuery 1.7. Still triggers the error.

Any ideas?

like image 534
Jack Avatar asked Nov 05 '11 15:11

Jack


1 Answers

Worked it out - it wasn't immediately obvious either, but posting this here for anyone who gets tripped up by this in future:

It was a Chrome Extension that used an old version of jQuery causing the issue. Disabling all Extensions and re-enabling one at a time helped me find the perpetrator. Hope this helps for anyone else with this issue in the future!

like image 149
Jack Avatar answered Nov 14 '22 22:11

Jack