Skip to content

Commit d2d850c

Browse files
committed
Update rzslider.js
Bug when use with other drag&drop framework, specify an event handler with specific type allow to not destroy other general purpose "onmouse" event handler (jquery-ui)
1 parent 613bc50 commit d2d850c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

rzslider.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -784,13 +784,13 @@ function throttle(func, wait, options) {
784784

785785
if(event.touches)
786786
{
787-
$document.on('touchmove', angular.bind(this, this.onMove, pointer));
788-
$document.on('touchend', angular.bind(this, this.onEnd));
787+
$document.on('touchmove.rzslider', angular.bind(this, this.onMove, pointer));
788+
$document.on('touchend.rzslider', angular.bind(this, this.onEnd));
789789
}
790790
else
791791
{
792-
$document.on('mousemove', angular.bind(this, this.onMove, pointer));
793-
$document.on('mouseup', angular.bind(this, this.onEnd));
792+
$document.on('mousemove.rzslider', angular.bind(this, this.onMove, pointer));
793+
$document.on('mouseup.rzslider', angular.bind(this, this.onEnd));
794794
}
795795
},
796796

@@ -876,13 +876,13 @@ function throttle(func, wait, options) {
876876

877877
if(event.touches)
878878
{
879-
$document.unbind('touchmove');
880-
$document.unbind('touchend');
879+
$document.unbind('touchmove.rzslider');
880+
$document.unbind('touchend.rzslider');
881881
}
882882
else
883883
{
884-
$document.unbind('mousemove');
885-
$document.unbind('mouseup');
884+
$document.unbind('mousemove.rzslider');
885+
$document.unbind('mouseup.rzslider');
886886
}
887887

888888
this.tracking = '';

0 commit comments

Comments
 (0)