SitePen / dgrid

A lightweight, mobile-ready, data-driven, modular grid widget designed for use with dstore
http://dgrid.io/
Other
628 stars 298 forks source link

Fix Keyboard and DnD incompatibility (#1067) #1445

Closed msssk closed 4 years ago

msssk commented 4 years ago

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.