[thelist] js: onMouseDown() vs onClick()

Michael Pemberton pemberton_m at hotmail.com
Wed Feb 27 19:13:01 CST 2002


I apologise for being vague.  My comment was based on experiences that I had
while working with the guys on dynapi2.  There were patches going left and
right to manually trigger a click event.

Some of my experiences have been from to my own attempts to create a common
event structure between IE and NS.  For example, if you click on a layer /
link and move the mouse before releasing the button, the mouse up event is
seem as coming from the new location.  But this is onjly in IE.  NS still
sees the mouse as being released in the same location as the mouse down.

Meanwhile, the onclick event was also being thrown to either location.  This
meant that something that worked in the onclick event on NS was failing in
IE if the user slipped while clicking.

Another example is the right mouse button events.  IE causes the menu to
appear on the mouseup event, NS on the mousedown.  This is very confusing if
you want to stop the menu from appearing.

I just feel that the onclick event is simply an alias for one of the other
methods and as such until the browsers decide to all point to the same
method, it is too confusing to use it regularly.

If you want to see what I have done, you can see my AfroAPI release based on
the DynAPI.  The events handling code has been written to force IE to behave
in the same fashion as NS.

http://members.evolt.org/mpember/afroapix/

----Original Message Follows----
From: ".jeff" <jeff at members.evolt.org>
Date: Wed, 27 Feb 2002 16:16:41 -0800

could you elaborate on this for me?

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the thelist mailing list