Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

Commit c6b779e

Browse files
authored
Touch support (#165)
Adding support for touch dragging
1 parent 9b195e9 commit c6b779e

22 files changed

+2189
-741
lines changed

ISSUE_TEMPLATE.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,27 @@
44
<!--
55
If raising a feature request please be sure to have a search
66
through other open and closed issues tagged with 'new feature'
7+
8+
https://github.com/atlassian/react-beautiful-dnd/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aclosed%20is%3Aissue%20
79
-->
810

911
<!-- If raising a bug -->
10-
### Expected behaviour
1112

12-
### Actual behaviour
13+
### Expected behavior
14+
15+
### Actual behavior
1316

1417
### Steps to reproduce
1518

1619
### Browser version
17-
<!--
18-
Keep in mind our supported browser matrix https://confluence.atlassian.com/cloud/supported-browsers-744721663.html
20+
21+
<!--
22+
Keep in mind our supported browser matrix https://confluence.atlassian.com/cloud/supported-browsers-744721663.html
1923
If you raise a bug that is not in a supported version we will not be fixing it
2024
-->
2125

2226
### Demo
27+
2328
<!--
2429
Please provide a webpack bin to show the issue. Here is a boilerplate to help you get started:
2530
https://www.webpackbin.com/bins/-Kr9aE9jnUeWlphY8wsw
@@ -31,7 +36,7 @@ If it is a visual bug, a video or a gif would be helpful also.
3136
Issues without demo's may not be investigated
3237
-->
3338

34-
<!--
39+
<!--
3540
Note: stale issues will be removed
3641
When a maintainer asks a question about an issue and it is not responded to within a reasonable timeframe then the issue will be closed. We don't want this to happen - but we also do not want to accumulate stale issues
3742
--->

README.md

Lines changed: 208 additions & 57 deletions
Large diffs are not rendered by default.

src/view/drag-handle/drag-handle-types.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import type { Position, Direction } from '../../types';
2-
3-
export type DragTypes = 'KEYBOARD' | 'MOUSE';
1+
import type { Position, Direction, HTMLElement } from '../../types';
42

53
export type Callbacks = {|
6-
onLift: (point: Position) => void,
7-
onKeyLift: () => void,
4+
onLift: ({ client: Position, isScrollAllowed: boolean }) => void,
85
onMove: (point: Position) => void,
96
onWindowScroll: (diff: Position) => void,
107
onMoveForward: () => void,
@@ -18,6 +15,8 @@ export type Callbacks = {|
1815
export type Provided = {|
1916
onMouseDown: (event: MouseEvent) => void,
2017
onKeyDown: (event: KeyboardEvent) => void,
18+
onTouchStart: (event: TouchEvent) => void,
19+
onTouchMove: (event: TouchEvent) => void,
2120

2221
// Conditionally block clicks
2322
onClick: (event: MouseEvent) => void,
@@ -43,10 +42,7 @@ export type Props = {|
4342
// the direction of the current droppable
4443
direction: ?Direction,
4544
callbacks: Callbacks,
45+
// get the ref of the draggable
46+
getDraggableRef: () => ?HTMLElement,
4647
children: (?Provided) => void,
4748
|}
48-
49-
// Custom event format for force press inputs
50-
export type MouseForceChangedEvent = MouseEvent & {
51-
webkitForce?: number,
52-
}

0 commit comments

Comments
 (0)