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

Fix Keyboard and DnD incompatibility (#1067) #1445

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

msssk
Copy link
Contributor

@msssk msssk commented Nov 8, 2019

dgrid/extensions/DnD uses dojo/dnd/Source which registers an event handler
using on(node, touch.press). touch.press evaluates to 'pointerdown' in
browsers that support pointer events, and when the 'pointerdown' listener is
registered the 'mousedown' listener is never called.

This change causes Keyboard to use touch.press when DnD is being used. It also
exposes a new configuration property, mouseDownEventType, which enables
developers to further customize this behavior.

`dgrid/extensions/DnD` uses `dojo/dnd/Source` which registers an event handler
using `on(node, touch.press)`. `touch.press` evaluates to `'pointerdown'` in
browsers that support pointer events, and when the `'pointerdown'` listener is
registered the `'mousedown'` listener is never called. This change causes
Keyboard to use `touch.press` when DnD is being used. It also exposes a new
configuration property, `mouseDownEventType`, which enables developers to
further customize this behavior.
@msssk msssk requested review from dylans and edhager November 8, 2019 22:27
Copy link
Member

@dylans dylans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable to me.

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

Successfully merging this pull request may close these issues.

3 participants