safari 2.x onmouseover / onmouseout bug
I came across a little bug (well maybe not that little) in Safari 2.x. It works properly in Safari 1.x (on Panther).
Essentially, just create any basic href tag in your favorite html editor and add these attributes to it:
<pre> onMouseOver="alert('mouse over');" onMouseOut="alert('mouse out');"</pre>
An example of the whole link looks like this:
<pre><a href="#" onMouseOver="alert('mouse over');" onMouseOut="alert('mouse out');">
Alert On Mouse Over and On Mouse Out
</a></pre>
Once this is done, preview it in a browser (i've been doing it on safari on tiger (v 2.x) safari on panther (v 1.x) and IE on mac and windows. Firefox has a separate issue on the mac (which I'll get to later).
In the preview of the browser, you need to be able to mouse over the link and keep the cursor there so that you can clear the alerts with the return key on the keyboard (NOT with the mouse). Firefox on the mac does not let me clear the alert window with the keyboard return key.
Ok.. if you haven't checked it on safari 2.x check it now. You should notice that when you clear the first "mouse over" alert, a new "mouse out" alert shows. clear that and another "mouse over" alert appears. Clear it and it's done.
Now, mouse away to trigger the "onmouseout" event. Do the same process to clear any alert windows: use the keyboard and not the mouse. In safari 2.x you will see "mouse out" as an alert, followed by a "mouse over" alert, follwed by a "mouse out" alert.
I know many may say, well.. the final alert for both events is the proper event. The issue I have is what if the 2nd (middle event / alert that is triggered -- the wrong event / alert), has a delay for the event to finish [i.e. an AJAX event] that ends up completing AFTER the final / correct event / alert. In easier terms, the onmouseover triggers and ajax / delayed event so when you mouse out, it does not complete in time for the final on mouse out command to be the TRUE last command.
Any thoughts would be appreciated.
G4 QuickSilver Tower Mac OS X (10.4.6)
Essentially, just create any basic href tag in your favorite html editor and add these attributes to it:
<pre> onMouseOver="alert('mouse over');" onMouseOut="alert('mouse out');"</pre>
An example of the whole link looks like this:
<pre><a href="#" onMouseOver="alert('mouse over');" onMouseOut="alert('mouse out');">
Alert On Mouse Over and On Mouse Out
</a></pre>
Once this is done, preview it in a browser (i've been doing it on safari on tiger (v 2.x) safari on panther (v 1.x) and IE on mac and windows. Firefox has a separate issue on the mac (which I'll get to later).
In the preview of the browser, you need to be able to mouse over the link and keep the cursor there so that you can clear the alerts with the return key on the keyboard (NOT with the mouse). Firefox on the mac does not let me clear the alert window with the keyboard return key.
Ok.. if you haven't checked it on safari 2.x check it now. You should notice that when you clear the first "mouse over" alert, a new "mouse out" alert shows. clear that and another "mouse over" alert appears. Clear it and it's done.
Now, mouse away to trigger the "onmouseout" event. Do the same process to clear any alert windows: use the keyboard and not the mouse. In safari 2.x you will see "mouse out" as an alert, followed by a "mouse over" alert, follwed by a "mouse out" alert.
I know many may say, well.. the final alert for both events is the proper event. The issue I have is what if the 2nd (middle event / alert that is triggered -- the wrong event / alert), has a delay for the event to finish [i.e. an AJAX event] that ends up completing AFTER the final / correct event / alert. In easier terms, the onmouseover triggers and ajax / delayed event so when you mouse out, it does not complete in time for the final on mouse out command to be the TRUE last command.
Any thoughts would be appreciated.
G4 QuickSilver Tower Mac OS X (10.4.6)