Skip to content

Commit

Permalink
Merge pull request #147 from patr0nus/master
Browse files Browse the repository at this point in the history
Check the clicked mouse button before dragging
  • Loading branch information
nathancahill committed Oct 9, 2018
2 parents 651b299 + 7bd89ef commit 0b37828
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/split.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ const Split = (idsOption, options = {}) => {
// It also adds event listeners for mouse/touch events,
// and prevents selection while dragging so avoid the selecting text.
function startDragging (e) {
//Right-clicking can't start dragging.
if (e.button !== 0) {
return;
}

// Alias frequently used variables to save space. 200 bytes.
const self = this
const a = elements[self.a].element
Expand Down

0 comments on commit 0b37828

Please sign in to comment.