Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

what changed with the mousemove event, doesn'y work w/FF7

  • 3 回覆
  • 1 有這個問題
  • 43 次檢視
  • 最近回覆由 knorretje

more options

The code below was broken by the FF7 update. When you click on the image moving the mouse should scan across the enlarged image. Problem happens with Windows 7 as well.

The code below was broken by the FF7 update. When you click on the image moving the mouse should scan across the enlarged image. Problem happens with Windows 7 as well.

所有回覆 (3)

more options

The Tools > Error Console show error about parsing the value of top an left, so something else is wrong.

A good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

xPos=(ev.pageX-PhotoSm.x)/PhotoSm.width;
yPos=(ev.pageY-PhotoSm.y)/PhotoSm.height;
I noticed that:
PhotoSm.x and PhotoSm.y have a value of undefined, so xPos and yPos become NaN (not a number).
In the documentation it says: The HTMLImageElement x and y properties have been removed.
https://developer.mozilla.org/en/Firefox_7_for_developers
So maybe that is the reason that it's broken.

more options

I have tried this on my own computer. It do not know about older versions but it seems to work in Firefox 7 when you use the same code for xPos and yPos in Firefox as in IE. I get some kind of magnifier effect.

if (navigator.appName.indexOf("Microsoft") > -1)
{
ev=event;
}
xPos=(ev.clientX+document.body.scrollLeft-targetLeft)/PhotoSm.width;
yPos=(ev.clientY+document.body.scrollTop-targetTop)/PhotoSm.height;