diff --git a/ui/jquery.ui.interaction.js b/ui/jquery.ui.interaction.js index a060e9509..01f8984e1 100644 --- a/ui/jquery.ui.interaction.js +++ b/ui/jquery.ui.interaction.js @@ -27,6 +27,20 @@ $.widget( "ui.interaction", { } }, + /** abstract methods **/ + + // _start: function( event, pointerPosition ) + // _move: function( event, pointerPosition ) + // _stop: function( event, pointerPosition ) + + /** protected **/ + + _isValidTarget: function( target ) { + return true; + }, + + /** internal **/ + // a pass through to _interactionStart() which tracks the hook that was used _startProxy: function( hook ) { var that = this; @@ -67,10 +81,6 @@ $.widget( "ui.interaction", { _interactionStop: function( event, pointerPosition ) { this._stop( event, pointerPosition ); interaction.started = false; - }, - - _isValidTarget: function( target ) { - return true; } }); @@ -84,6 +94,7 @@ interaction.hooks.mouse = { setup: function( widget, start ) { widget._bind({ "mousedown": function( event ) { + // only react to the primary button if ( event.which === 1 ) { var started = start( event, event.target, { x: event.pageX, @@ -91,6 +102,7 @@ interaction.hooks.mouse = { }); if ( started ) { + // prevent selection event.preventDefault(); } }