DataGrid: Fix horizontal touch scrolling on freespace row with rowDragging enabled (T1329643)#34116
DataGrid: Fix horizontal touch scrolling on freespace row with rowDragging enabled (T1329643)#34116Alyar666 wants to merge 2 commits into
Conversation
…gging enabled (T1329643)
There was a problem hiding this comment.
Pull request overview
Fixes a touch interaction regression in the internal Draggable implementation used by DataGrid row dragging, ensuring horizontal native scrolling isn’t blocked when a drag gesture is detected but an actual drag doesn’t start (T1329643).
Changes:
- Adjusts when
dragInProgressis set and adds logic to allow native scrolling by settinge._cancelPreventDefaultwhen no drag is active. - Refactors drag-move handling slightly (extracting
_moveDragElement) and stores the last move event for auto-scroll reprocessing. - Adds Jest coverage around
dragInProgressand preventDefault behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/m_draggable.ts | Updates drag state timing and prevents dxdrag from blocking native scrolling when no drag is in progress. |
| packages/devextreme/js/__internal/tests/draggable.test.ts | Adds Jest tests for dragInProgress and default-prevention behavior during drag gestures. |
|
|
||
| dragInProgress?: boolean; | ||
|
|
||
| _dragMoveArgs?: any; |
There was a problem hiding this comment.
please, add actual type instead of any
There was a problem hiding this comment.
I've thought about that, but I couldn't find a suitable type. We don't currently have types for drag events. Could you suggest what we should use?”
| @@ -790,16 +792,15 @@ class Draggable extends DOMComponent<Draggable, Properties> { | |||
| } | |||
|
|
|||
| _dragMoveHandler(e) { | |||
There was a problem hiding this comment.
lets add typings to the method, as we touched it
There was a problem hiding this comment.
This is the same issue I mentioned above — I couldn't find a suitable type for the e parameter. At most, I can specify the method's return type (void) and access modifier (private).
I think we should create a separate task for proper Draggable/Sortable typing and address it there. For now, I'd prefer to leave it as is.
There was a problem hiding this comment.
lets start with native DragEvent, we can wrap it inside DxEvent if method required some data from it. It is too small for a separate task
No description provided.