Prohledat stránky podpory

Vyhněte se podvodům. Za účelem poskytnutí podpory vás nikdy nežádáme, abyste zavolali nebo poslali SMS na nějaké telefonní číslo nebo abyste sdělili své osobní údaje. Jakékoliv podezřelé chování nám prosím nahlaste pomocí odkazu „Nahlásit zneužití“.

Zjistit více

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

  • 3 odpovědi
  • 1 má tento problém
  • 43 zobrazení
  • Poslední odpověď od 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.

Všechny odpovědi (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;