W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Button values for Events need Modified

From: Jeff Yates <PBWiz@PBWizard.com>
Date: Mon, 2 Apr 2001 01:15:45 -0400
Message-ID: <00f401c0bb33$f95f1c20$6a5dfea9@pbwizshop>
To: "WWW DOM" <www-dom@w3.org>
I have run into a problem with the MouseEvent recommendation.  During a mouseover event I need to know what/if a mouse button is pressed.  If so do one action, if not do another.   The problem is that the MouseEvent does not tell you IF A BUTTON IS BEING PRESSED, or if multiple buttons are being pressed.

Imagine this scenario.  You want a "button" to be in the "pressed" state whenever the mouse is over it and the left button is pressed.  You cannot detect this state with the MouseEvent because for this event NO BUTTON PRESSING EVENT HAPPEND!

What if the button was pressed outside of the browser window?

Ok, lets say that the implementer decides to pass which button is being pressed.  What if two buttons are pressed?  

Well, I know that now that the recommendation has been finalized, this will not happen.  So instead of changing it we need other properties.  Maybe leftButton, rightButton and middleButton Boolean properties that tell the user which buttons are currently pressed.  You can still use the button property to show which button the current event is reacting too, but we need state properties as well.

Regards,

Jeff Yates
e-mail:    PBWiz@PBWizard.com
Homepage:  http://www.PBWizard.com
Received on Monday, 2 April 2001 01:19:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT