TidGi-Desktop/patches/react-sortable-hoc+1.11.0.patch

17 lines
918 B
Diff

diff --git a/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js b/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
index ac57135..b0f8b08 100644
--- a/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
+++ b/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
@@ -601,7 +601,11 @@ function sortableContainer(WrappedComponent) {
distance = _this$props.distance,
shouldCancelStart = _this$props.shouldCancelStart;
- if (event.button === 2 || shouldCancelStart(event)) {
+ // https://github.com/clauderic/react-sortable-hoc/issues/256
+ var isRightClick = (event.buttons === 1 && event.ctrlKey === true) // macOS trackpad ctrl click
+ || event.which === 3 || event.button === 2; // Regular mouse or macOS double-finger tap
+
+ if (isRightClick || shouldCancelStart(event)) {
return;
}