W3C home > Mailing lists > Public > public-pointer-events@w3.org > January to March 2016

Re: [pointerevents] Value of button attribute for pointermove event

From: Ted Dinklocker via GitHub <sysbot+gh@w3.org>
Date: Mon, 01 Feb 2016 22:50:21 +0000
To: public-pointer-events@w3.org
Message-ID: <issue_comment.created-178239365-1454367017-sysbot+gh@w3.org>
Upon consultation with the developer that owns this area for Edge, I 
believe bethge gets it with his last response. When a pointerevent is 
triggered by a button change, event.button will have that value.

So for non-chorded case, pointerdown/pointerup will have the button 
that was pressed/lifted, but when the mouse is moved while the button 
is down, the button doesn’t trigger those events, so button is -1, the
 default value.

For chorded case, a chorded press will trigger a pointermove event, so
 event.button will be the newly pressed button. As bethge mentioned, 
without this you would need to keep track of extra state to figure out
 which button press caused the pointermove.

-- 
GitHub Notification of comment by teddink
Please view or discuss this issue at 
https://github.com/w3c/pointerevents/issues/33#issuecomment-178239365 
using your GitHub account
Received on Monday, 1 February 2016 22:50:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 1 February 2016 22:50:24 UTC