@react-aria/dnd 3.3.1-nightly.4016 → 3.3.1-nightly.4017
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +6 -0
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -1
- package/dist/module.js +6 -0
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/useDrag.ts +9 -0
package/dist/import.mjs
CHANGED
|
@@ -2330,6 +2330,8 @@ function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
|
|
|
2330
2330
|
let onDragStart = (e)=>{
|
|
2331
2331
|
var _options_preview;
|
|
2332
2332
|
if (e.defaultPrevented) return;
|
|
2333
|
+
// Prevent the drag event from propagating to any parent draggables
|
|
2334
|
+
e.stopPropagation();
|
|
2333
2335
|
// If this drag was initiated by a mobile screen reader (e.g. VoiceOver or TalkBack), enter virtual dragging mode.
|
|
2334
2336
|
if (modalityOnPointerDown.current === "virtual") {
|
|
2335
2337
|
e.preventDefault();
|
|
@@ -2388,6 +2390,8 @@ function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
|
|
|
2388
2390
|
});
|
|
2389
2391
|
};
|
|
2390
2392
|
let onDrag = (e)=>{
|
|
2393
|
+
// Prevent the drag event from propagating to any parent draggables
|
|
2394
|
+
e.stopPropagation();
|
|
2391
2395
|
if (e.clientX === state.x && e.clientY === state.y) return;
|
|
2392
2396
|
if (typeof options.onDragMove === "function") options.onDragMove({
|
|
2393
2397
|
type: "dragmove",
|
|
@@ -2398,6 +2402,8 @@ function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
|
|
|
2398
2402
|
state.y = e.clientY;
|
|
2399
2403
|
};
|
|
2400
2404
|
let onDragEnd = (e)=>{
|
|
2405
|
+
// Prevent the drag event from propagating to any parent draggables
|
|
2406
|
+
e.stopPropagation();
|
|
2401
2407
|
if (typeof options.onDragEnd === "function") {
|
|
2402
2408
|
let event = {
|
|
2403
2409
|
type: "dragend",
|
package/dist/main.js
CHANGED
|
@@ -2349,6 +2349,8 @@ function $dc204e8ec58447a6$export$7941f8aafa4b6021(options) {
|
|
|
2349
2349
|
let onDragStart = (e)=>{
|
|
2350
2350
|
var _options_preview;
|
|
2351
2351
|
if (e.defaultPrevented) return;
|
|
2352
|
+
// Prevent the drag event from propagating to any parent draggables
|
|
2353
|
+
e.stopPropagation();
|
|
2352
2354
|
// If this drag was initiated by a mobile screen reader (e.g. VoiceOver or TalkBack), enter virtual dragging mode.
|
|
2353
2355
|
if (modalityOnPointerDown.current === "virtual") {
|
|
2354
2356
|
e.preventDefault();
|
|
@@ -2407,6 +2409,8 @@ function $dc204e8ec58447a6$export$7941f8aafa4b6021(options) {
|
|
|
2407
2409
|
});
|
|
2408
2410
|
};
|
|
2409
2411
|
let onDrag = (e)=>{
|
|
2412
|
+
// Prevent the drag event from propagating to any parent draggables
|
|
2413
|
+
e.stopPropagation();
|
|
2410
2414
|
if (e.clientX === state.x && e.clientY === state.y) return;
|
|
2411
2415
|
if (typeof options.onDragMove === "function") options.onDragMove({
|
|
2412
2416
|
type: "dragmove",
|
|
@@ -2417,6 +2421,8 @@ function $dc204e8ec58447a6$export$7941f8aafa4b6021(options) {
|
|
|
2417
2421
|
state.y = e.clientY;
|
|
2418
2422
|
};
|
|
2419
2423
|
let onDragEnd = (e)=>{
|
|
2424
|
+
// Prevent the drag event from propagating to any parent draggables
|
|
2425
|
+
e.stopPropagation();
|
|
2420
2426
|
if (typeof options.onDragEnd === "function") {
|
|
2421
2427
|
let event = {
|
|
2422
2428
|
type: "dragend",
|