Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trying out instead of document for dragstart bindings

  • Loading branch information...
commit de567d1d883d15cd92f5a2ef47e2465e52993b45 1 parent 62031af
Chris Mullins authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 jquery.kinetic.js
13 jquery.kinetic.js
View
@@ -175,7 +175,7 @@
}
$this.click(settings.events.inputClick)
.bind("selectstart", selectStart); // prevent selection when dragging
- $(document).bind("dragstart", settings.events.dragStart); // prevent draggable images
+ $this.bind('dragstart', settings.events.dragStart);
};
var detachListeners = function($this, settings) {
var element = $this[0];
@@ -191,7 +191,7 @@
}
$this.unbind('click', settings.events.inputClick)
.unbind("selectstart", selectStart); // prevent selection when dragging
- $(document).unbind("dragstart", settings.events.dragStart);
+ $this.unbind('dragstart', settings.events.dragStart);
};
var initElements = function(options) {
@@ -218,10 +218,6 @@
settings.velocity = 0;
settings.velocityY = 0;
- // prevent drag and drop images in ie
- var dragFilter = function(e) {
- return !!elementFocused;
- };
// make sure we reset everything when mouse up
var resetMouse = function() {
xpos = false;
@@ -311,7 +307,10 @@
return false;
}
},
- dragStart: dragFilter
+ // prevent drag and drop images in ie
+ dragStart: function(e) {
+ return !!elementFocused;
+ }
};
attachListeners($this, settings);
Please sign in to comment.
Something went wrong with that request. Please try again.