WebKit 问题与 event.layerX 和 event.layerY [英] WebKit issues with event.layerX and event.layerY

查看:33
本文介绍了WebKit 问题与 event.layerX 和 event.layerY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到,在 Chrome 的最新(金丝雀)版本中,我收到了大量已弃用的警告.

I just noticed that I get tons of deprecated warnings in the latest (canary) build of Chrome.

event.layerX 和 event.layerY 在 WebKit 中被破坏和弃用.它们将在不久的将来从引擎中移除.

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

看起来 jQuery 把事情搞砸了.

Looks like jQuery is screwing thing up.

我正在使用:jquery-1.6.1.min.js.

升级到最新的 jQuery 版本是否有帮助,或者它是否尚未修复,或者是 Chrome 错误还是其他问题.

Would it help to upgrade to the latest jQuery version or isn't it fixed yet or is it a Chrome bug or is it something else.

附注

我无法向您展示代码,因为我认为这是一个一般错误,但我怀疑当我尝试访问 jQuery 对象或 jQuery 尝试访问 layerX/layerY 时会抛出警告(我很确定那是考虑到错误的情况:P).

I cannot show you code because I think it's a general error, but I suspect the warnings get thrown when I try to access a jQuery object or when jQuery tries to access the layerX / layerY (well I'm pretty sure that's the case considering the error :P).

jQuery 可能会将这些属性复制到 jQuery 对象中.

jQuery probably copies those properties into the jQuery object.

所以...

怎么回事?

编辑

jQuery 1.7 已发布并修复了此问题.

jQuery 1.7 is out and fixes this issue.

阅读更多在他们的博客上.

推荐答案

发生了什么事!?

jQuery 可能会将这些属性复制到 jQuery 对象中."你完全正确,所以听起来你已经知道了!:)

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

希望 jQuery 将更新他们的代码以停止触及它,但与此同时,WebKit 应该知道最好不要在事件上记录弃用警告(至少在我看来).一个 mousemove 处理程序和您的控制台爆炸.:)

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. :)

这是最近的 jQuery 票:http://bugs.jquery.com/ticket/10531

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

更新:如果您升级到 jQuery 1.7,此问题现已修复.

请注意,如果升级 jQuery 不能为您解决问题,则可能与 Jake 在他的 answer.

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.

这篇关于WebKit 问题与 event.layerX 和 event.layerY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆