Closed Bug 418908 Opened 16 years ago Closed 14 years ago

Multiple onClick/onMouseDown/onMouseUp/onMouseMove makes leads to strange reaction

Categories

(Firefox :: General, defect)

2.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: cx42net, Unassigned)

References

()

Details

(Whiteboard: [CLOSEME 2010-07-30])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.12; .NET CLR 2.0.50727) Gecko/20080201 Firefox/2.0.0.12
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.12; .NET CLR 2.0.50727) Gecko/20080201 Firefox/2.0.0.12

Note : The problem does not report only on my application but also on Google Agenda, but it's the best way to show the problem and the way with Google Agenda is more difficult (more complex application that cover the bug, maybe)

Sometime, mouseDown and mouseMove makes firefox move Div element like you would drag an image (to open it on a new window for example). You have the div (sometime in a inferior size) move with your mouse, with an alpha (maybe around 30%) and the mouse will change it style for a circle with a slash (like a "No-way" icon)
This reaction makes firefox act weirdly.

Try it, on the scheduler, click and move your mose very often and sometime you will see the div's moving with your mouse !

Reproducible: Sometimes

Steps to Reproduce:
1. Click on the green Div, when your mouse is on the nw-resize style
2. Mouve your mouse and you will see the div follow you (not always)
3. Firefox will believe that the div is an image
4. Firefox will change the mouse with the "no-way" icon (a circle with a slash) and move the div with a alpha (I would like to say about 30%)

Note : Google Agenda is difficult for reproduce the problem (maybe too complex application ;)), it's bugs better with my application.


Expected Results:  
Maybe act like Firefox 2, don't move the div when you click on it ? ;)

1. The bug is certainly linked with the one that the style of the mouse does not change when you use onMouseMove (I have the same bug). (Sorry I couldn't find the Bug Id :/)
2. The Bug was tested under Firefox 3b2 (no bug under Firefox 2)
3. Sorry for my English :/
Hi,

I just wrote some javascript which - at least I think - showed the same
behavior as you mentioned in your Bugreport.

If you click on the Tablecolums, the Javascript to hightlight the columns
will not be executed every time. Also the Tooltip only appears as you wish,
if you move your mouse above the text first and not click on a column first.


Here is my sample-HTML-page which shows the bug:



<html>
<head>
  <script>
  wmtt = null;

  function updateWMTT(e)
  {
    x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
    y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
    if (wmtt != null) {
      wmtt.style.left = (x + 20) + "px";
      wmtt.style.top   = (y + 20) + "px";
    }
  }

  function showWMTT(id)
  {
    wmtt = document.getElementById(id);
    wmtt.style.display = "block"
  }

  function hideWMTT()
  {
    wmtt.style.display = "none";
  }

  function mark_it()
  {
    if (document.rechnung.schritt.value != "")
    {
      laden(document.rechnung.schritt.value,0);
    }
  }

  document.onmousemove = updateWMTT;
  
  function load(id)
  {
    color1  = "#FFFFFF";
    color2  = "#FFFFFF";
    color3  = "#FFFFFF";
    
    switch (id)
    {
      case '1': color1 = "#00FF00";
                break;
      
      case '2': color2 = "#00FF00";
                break;
      
      case '3': color3 = "#00FF00";
                break;
    }
    
    document.all.Schritt1.style.backgroundColor = color1;
    document.all.Schritt2.style.backgroundColor = color2;
    document.all.Schritt3.style.backgroundColor = color3;
  }
  </script>
  <style>
  .tooltip
    {
      position: absolute;
      display: none;
      background-color: #FFFFFF;
      border-width: 1px;
      border-style: solid;
      border-color: #000000;
      padding: 2px;
      font-size: 10pt;
    }
  </style>
</head>
<body>
<center>
</br>
</br>
</br>
<table border="0" width="100" cellspacing="0" cellpadding="0">
<tr>
  <td width="100" align="center" id="Schritt1" onMouseDown="javascript: load('1');" style="background-color: #FFFFFF; border-style: solid">&nbsp;</td>
  <td></td>
</tr>
<tr>
  <td colspan="2" style="height: 10px"></td>
</tr>
<tr>
  <td width="100" align="center" id="Schritt2" onMouseDown="javascript: load('2');" style="background-color: #FFFFFF; border-style: solid">&nbsp;</td>
  <td></td>
</tr>
<tr>
  <td colspan="2" style="height: 10px"></td>
</tr>
<tr>
  <td width="100" align="center" id="Schritt3" onMouseDown="javascript: load('3');" style="background-color: #FFFFFF; border-style: solid">&nbsp;</td>
  <td></td>
</tr>
</table>
</br>
</br>
<a href="#" onMouseOver="showWMTT('1');" onMouseOut="hideWMTT()">Tooltip here</a>
<div class="tooltip" id="1">Hello World!!!</div>
</body>
</html>
This bug was originally reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.6 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
http://www.mozilla.com
http://support.mozilla.com/kb/Managing+profiles
http://support.mozilla.com/kb/Safe+mode
Whiteboard: [CLOSEME 2010-07-30]
Version: unspecified → 2.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.8 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.