Skip to content

Commit

Permalink
dismiss clicks from right button; fixes #29
Browse files Browse the repository at this point in the history
  • Loading branch information
desandro committed Oct 23, 2013
1 parent 0adb26b commit aa0ebe2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "draggabilly",
"main": "draggabilly.js",
"version": "1.0.6",
"version": "1.0.7",
"description": "make that shiz draggable",
"dependencies": {
"classie": "desandro/classie",
Expand Down
7 changes: 6 additions & 1 deletion draggabilly.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Draggabilly v1.0.6
* Draggabilly v1.0.7
* Make that shiz draggable
* http://draggabilly.desandro.com
*/
Expand Down Expand Up @@ -236,6 +236,11 @@ Draggabilly.prototype.getTouch = function( touches ) {
// ----- start event ----- //

Draggabilly.prototype.onmousedown = function( event ) {
// dismiss clicks from right or middle buttons
var button = event.button;
if ( button && ( button !== 0 && button !== 1 ) ) {
return;
}
this.dragStart( event, event );
};

Expand Down

0 comments on commit aa0ebe2

Please sign in to comment.