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

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

问题描述


event.layerX和事件

我刚刚注意到,我在Chrome的最新版本(金丝雀)中收到了大量不推荐使用的警告。 .layerY在WebKit中被破坏并被弃用。它们将在不久的将来从引擎中删除。


看起来像jQuery正在搞砸东西。



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



它会帮助升级到最新的jQuery版本,或者它现在还没有修复,或者它是一个Chrome bug或者是其他的东西。



PS



我无法向您展示代码,因为我认为这是一个普遍错误,但我怀疑在尝试访问jQuery对象或jQuery尝试访问layerX / layerY时引发警告我很确定这是考虑到错误的情况:P)。

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

因此...

发生了什么?

编辑 jQuery 1.7已经发布并修正了这个问题。

阅读更多 at their b日志,在这里

解决方案

发生了什么!?
$ b 属性放入jQuery对象中。你完全正确,所以听起来你已经知道了! :)

希望jQuery将更新他们的代码以停止触摸它,但同时WebKit应该知道比在事件上记录弃用警告更好(至少我的想法是)。一个mousemove处理程序和您的控制台爆炸。 :)

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

更新:现在如果升级到jQuery 1.7,现在已经修复。请注意,如果升级jQuery不能解决您的问题,它可能与使用的扩展/插件有关,正如Jake在他的answer


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

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

Looks like jQuery is screwing thing up.

I'm using: jquery-1.6.1.min.js.

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.

PS

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 probably copies those properties into the jQuery object.

So...

What's going on?

EDIT

jQuery 1.7 is out and fixes this issue.

Read more at their blog, here.

解决方案

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.

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

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