Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deliteful widgets using pointerdown react equally to left, middle and right click. #516

Open
tkrugg opened this issue Feb 10, 2015 · 4 comments
Labels

Comments

@tkrugg
Copy link
Member

tkrugg commented Feb 10, 2015

All widgets using pointerdown respond equally to left, middle and right click.

I think they are all here: ToasterMessage, Switch, StarRating, Slider, SidePane, ViewIndicator, SwapView.

If we take a native widget such as a checkbox, it doesn't respond to right click. I believe our widgets should be checking which button was pushed before reacting, or some at least: for example as a user I'd expect Switch to behave like a checkbox.

@wkeese This may apply to delite/HasDropDown

@tkrugg tkrugg changed the title deliteful widget react equally deliteful widgets using pointerdown react equally to left, middle and right click. Feb 10, 2015
@cjolif cjolif added the bug label Feb 10, 2015
@wkeese
Copy link
Member

wkeese commented Feb 10, 2015

OK. So for mouse events we should respond to left-click only, but we also need to respond to touch events (which don't have a concept of left or right). Have to figure out how to test for those two cases.

@tkrugg
Copy link
Member Author

tkrugg commented Feb 11, 2015

For touch events, it's specified here: http://www.w3.org/TR/pointerevents/#chorded-button-interactions.
I checked and dpointer is implementing it.

@wkeese
Copy link
Member

wkeese commented Feb 11, 2015

Sounds like event.button === 0 will do what we want for both touch and mouse.

@tkrugg
Copy link
Member Author

tkrugg commented Feb 11, 2015

Native checkboxes, radio buttons and links respond to both left and middle click, so i'd say button === 0 or 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants