Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/DraggableCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@
// Make it possible to attach event handlers on top of this one.
this.props.onMouseDown(e);

// Only accept left-clicks.
if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;
// Only accept left-clicks. On macOS, ctrl+click is equivalent to right-click.
if (!this.props.allowAnyClick && ((typeof e.button === 'number' && e.button !== 0) || e.ctrlKey)) return false;

// Get nodes. Be sure to grab relative document (could be iframed)
const thisNode = this.findDOMNode();
Expand Down Expand Up @@ -377,7 +377,7 @@
try {
// $FlowIgnore
this.handleDragStop(new MouseEvent('mouseup'));
} catch (err) {

Check warning on line 380 in lib/DraggableCore.js

View workflow job for this annotation

GitHub Actions / lint

'err' is defined but never used
// Old browsers
const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);
// I see why this insanity was deprecated
Expand Down
Loading