diff --git a/src/SortableContainer/index.js b/src/SortableContainer/index.js index 9b24a045..02ec5d68 100644 --- a/src/SortableContainer/index.js +++ b/src/SortableContainer/index.js @@ -36,6 +36,8 @@ import { defaultKeyCodes, } from './props'; +const LEFT_MOUSE_BUTTON = 0; + export const SortableContext = React.createContext({ manager: {}, }); @@ -124,7 +126,7 @@ export default function sortableContainer( handleStart = (event) => { const {distance, shouldCancelStart} = this.props; - if (event.button === 2 || shouldCancelStart(event)) { + if (event.button !== LEFT_MOUSE_BUTTON || shouldCancelStart(event)) { return; }