本文介绍了做了与最新的Chrome更新的Andr​​oid铬pageY值的变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

做了最新版本的Andr​​oid铬休息的jQuery pageY值还是我完全失去了一些东西?
特别是从鼠标事件返回的pageX属性/ pageY值。

Did the latest version of android chrome break jquery pageY values or am I missing something completely?Specifically the pageX/pageY values returned from a mouse event.

<script>
$( document ).on( "click", function( event ) {
  $( "#log" ).text( "pageX: " + event.pageX + ", pageY: " + event.pageY );
});
</script>

一切都在Windows上的Chrome或Android的Firefox看起来不错。攻/盘旋时,此页面上显示的值是错误的路为Android铬。负数,大于预期数字,数字变焦/时,他们不应该等我已经尝试了不同的一对夫妇建立的jQuery上的jsfiddle网站滚动时发生变化,各个击破为Android浏览器。

Everything looks great on Windows Chrome, or Android Firefox. The values displayed on this page when tapping/hovering are WAY wrong for android chrome. Negative numbers, larger number than expected, numbers changing when zooming/scrolling when they shouldn't etc. I've tried a couple different builds of jquery on the jsfiddle site, all broken for android chrome.

下面是与它小提琴改为点击而不是鼠标移动:

Here's a fiddle with it changed to "click" instead of "mousemove":

再次台式机,iPhone和预期的Andr​​oid火狐的工作。 Android版Chrome的38.0.2125.102似乎很破的。

Again, desktop, iphone, and android firefox work as expected. Android chrome 38.0.2125.102 seems very broken.

我在生产code,它预计pageY是...准确。这code有一段时间没有被改变,所有的事情突然正在打破。

I have code in production that expects pageY to be... accurate. That code hasn't been changed in a while, and all of a sudden things are breaking.

想法?大家有没有看到这一点?是这样总是莫名其妙坏了?

Ideas? Is anyone else seeing this? Was this always broken somehow?

推荐答案

我也上的Nexus 5,看到这对Android版Chrome版本38.0.2125.102我不知道被引入这个bug的时候,却是现在突破code,我们依靠查找event.pageY值时。

I'm also seeing this on Chrome for Android version 38.0.2125.102 on a Nexus 5. I'm not sure when this bug was introduced, but it is now breaking code we depend on when looking up event.pageY values.

我检查我的设备,很明显,相对于桌面时报告的event.pageY值是错误的。同时降级到Chrome浏览器(32.0.1700.99)的早期版本为Android报告正确event.pageY值。

I inspected my device and it's clear that the event.pageY values reported are wrong when compared to the desktop. Also downgrading to an earlier version of Chrome (32.0.1700.99) for Android reports the correct event.pageY value.

这篇关于做了与最新的Chrome更新的Andr​​oid铬pageY值的变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 04:44