Closed Bug 264236 Opened 20 years ago Closed 8 years ago

OnMouseOut event not work any time

Categories

(Firefox :: General, defect)

x86
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bengal, Unassigned)

Details

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

Browser don't give OnMouseOut event any time at fast mouse scolling and more rows

<tr class="tsor2" onMouseOver="className='tsor2s';"
onMouseOut="className='tsor2';" OnClick="showdata('10');" valign="center">

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Can you give the link to that page
I have the same problem that onMouseOut event does not fire every time, but i
have more detailed problem.

Well i was using <a> element with text that was broken in two lines. Now when i
went with the mouse pointer over the 1st line of my link the onMouseOut event
fired as it should, but when i went over the 2nd line of my link the event
didn't fire anymore.

So it seems that there is a problem with onMouseOut event when the text is
broken into more lines
(In reply to comment #0)
[snip]
> Browser don't give OnMouseOut event any time at fast mouse scolling and more rows
>
> <tr class="tsor2" onMouseOver="className='tsor2s';"
> onMouseOut="className='tsor2';" OnClick="showdata('10');" valign="center">
>
> Reproducible: Always

I'm writing simply to confirm the bug. For some reason the browser is not always
detecting the "onmouseout" event, and so the object remains in whatever status
it was changed to by the "onmouseover" event. I have no idea what page the
original bug reporter observed the problem with, but I can give you this
reference to a page of my own I have coded where you can observe this problem:

http://www.mds-laser.com/index.html

You can observe the bad behavior by running your mouse cursor quickly up and
down the vertical menu at the upper left of the page. This menu is generated and
dynamically changes using a combination of javascript and CSS.

By the way, just for further information in case this may be of any relevance, I
noticed that while IE and Opera handle this okay, but I noticed that Netscape
7.1 which I also use shows the identical bad behavior. I thought that was a
little interesting. Incidentally, I'm running on a Windows XP SP2 platform. My
Firefox browser info is "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.5) Gecko/20041107 Firefox/1.0".
just confirmation
http://sh.miga.lv/menu.html
Here is a test case that displays the bug.  Move the cursor rapidly out of the
left cell and onmouseout often does not fire.  It always fires on the right
cell. The sequence of events (last 10) is shown in the far right cell.

<style type="text/css">
/* set the td size to stop the td collapsing
   when content is hidden */
td { width: 150px; height: 100px; }
</style>

<script type="text/javascript">
var msgTxt = ['<br>','<br>','<br>','<br>','<br>',
              '<br>','<br>','<br>','<br>','<br>'];
var evtCnt = 0;

 function writeMsg(a,b,c){
 var msgCel = document.getElementById('msgCel');
 var col = 'red';
 col = (c == 'left')? 'red' : 'green';

 msgTxt.unshift(a + ' ' + b + ' ' 
   + '<span style="color: ' + col
   + '; font-weight: bold">' + c + '</span>'
   + ' ' + evtCnt + '<br>');
  msgTxt.pop();
  msgCel.innerHTML = msgTxt.join('');
  evtCnt++;
 }

function addImage(tableCell,evt) {
  tableCell.style.backgroundImage = "url(1.gif)";
  tableCell.firstChild.style.display = "none";

  var e = evt || window.event;
  var c = e.target || e.srcElement;
  writeMsg(e.type,c.nodeName,tableCell.id);
}
function delImage(tableCell,evt) {
  tableCell.style.backgroundImage = "";
  tableCell.firstChild.style.display = "";

  var e = evt || window.event;
  var c = e.target || e.srcElement;
  writeMsg(e.type,c.nodeName,tableCell.id);
}

function addImage1(tableCell,evt) {
  tableCell.childNodes[0].style.display = "";
  tableCell.childNodes[1].style.display = "none";

  var e = evt || window.event;
  var c = e.target || e.srcElement;
  writeMsg(e.type,c.nodeName,tableCell.id);
}

function delImage1(tableCell,evt) {
  tableCell.childNodes[0].style.display = "none";
  tableCell.childNodes[1].style.display = "";

  var e = evt || window.event;
  var c = e.target || e.srcElement;
  writeMsg(e.type,c.nodeName,tableCell.id);

}
</script>

<table border="1">
<tr>
  <td id="left" onmouseover="addImage1(this,event)"
      onmouseout="delImage1(this,event)"><img
      src="1.gif" style="display: none"><span>some text</span>
  </td>
  <td  id="right" onmouseover="addImage(this,event)"
      onmouseout="delImage(this,event)"><span>some text</span>
  </td>
  <td style="width: 200px" id="msgCel">
    <br><br><br><br><br><br><br><br><br><br>
  </td>
</tr>
</table>
This bug is the biggest reason I have to resort to IE on websites. Attached is
the source for my company's payroll webpage. The developer added the
onmouseover/onclick section for navigation. I can't get past the login page
unless I use IE.
This page is also from the payroll website. You are supposed to be able to
click the checks in the listing to bring up a check details page. The
onmouseover/onclick doesn't work in Firefox.
Confirmed.
Onmouseout and onmouseover events are very important events that MUST behave 
and be fired correctly. I am building Mozilla applications and sometimes come 
across this bug, making it REALLY impossible to detect whether the mouse cursor 
is above an element or not. Weird things happen, I get null in relatedTarget 
while the mouse is still above the window, or events are not fired for 
intermideiate elements that the mouse pointer passes.

Please developers, take some time to fix these kind of bugs instead on 
focussing on new features only, the mouse event system is pretty useless for 
tool long time.
I'm interested in this topic, too 
(In reply to comment #5)
> Here is a test case that displays the bug. 

Rob, could you upload your testcase as attachment, please?

But NOT like the first two testcases. They display just garbage in the browser!
Seems, you have to download, unzip and move them to a directory to access them.
This is plain awkward! I don't think developers want to put up with that.

We need to make it easy for the developer to to check for the bug: Clicking on
the attachment link should show a page that allows for easy reproduction of the bug.
This may be a duplicate of bug #230152
Uploaded the HTML code from comment #5. Did some minor changes to make it
validate. The image is used is from mozilla.org.
Using nightly build
- Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20050829 Firefox/1.6a1

the bug is NOT exposed.

- testcase attachment "Testcase from comment#5"
- testcase from URL http://www.mds-laser.com/index.html
- testcase from URL http://sh.miga.lv/menu.html'

do NOT expose the bug on the nightly build (but the latter two on Mozilla 1.7.11)

So, as long as no proper testcase is supplied (for a trunk build), I vote for
this to be reset to UNCONFIRMED or WFM

WFM.
Downloaded BRANCH nightly build
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b4) Gecko/20050827 Firefox/1.0+

WFM.

Looking forward to Firefox 1.5 :-)
Assignee: bross2 → nobody
Comment on attachment 329234 [details]
testcase for OnMouseOut behaviour

a short list (table) - please move the mouse vertically on Col 2 and you see that the colour gets stuck after a while.
Attachment #329234 - Attachment description: a short list (table) - please move the mouse vertically on Col 2 and you see that the colour gets stuck after a while. → testcase for OnMouseOut behaviour
(In reply to Georg Gruber from comment #15)
> Comment on attachment 329234 [details]
> testcase for OnMouseOut behaviour
> 
> a short list (table) - please move the mouse vertically on Col 2 and you see
> that the colour gets stuck after a while.

Not reproduced. Tested on FF 50.0.2, Win10 and Arch Linux 64-bit.
Closing as WFM.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: