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.


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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC