Interaction: Pass widget() result to _bind call to allow binding to elements outside this.element

This commit is contained in:
Jörn Zaefferer 2012-05-25 17:10:16 +02:00
parent 8b47438d6c
commit 9f454b2f3d

View File

@ -92,7 +92,7 @@ $.extend( interaction, {
interaction.hooks.mouse = {
setup: function( widget, start ) {
widget._bind({
widget._bind( widget.widget(), {
"mousedown": function( event ) {
// only react to the primary button
if ( event.which === 1 ) {
@ -151,7 +151,7 @@ function getTouch( event ) {
var touchHook = interaction.hooks.touch = {
setup: function( widget, start ) {
widget._bind({
widget._bind( widget.widget(), {
"touchstart": function( event ) {
var touch, started;
@ -216,7 +216,7 @@ var touchHook = interaction.hooks.touch = {
var pointerHook = interaction.hooks.msPointer = {
setup: function( widget, start ) {
widget._bind({
widget._bind( widget.widget(), {
"MSPointerDown": function( _event ) {
var started,
event = _event.originalEvent;