Skip to content

Commit

Permalink
Fix a minor bug making disabled handle to be counted in the activeHan…
Browse files Browse the repository at this point in the history
…dlesCount.

This fix allows the drag class to be properly removed when a drag stops, even if disabled handles are the target of touches.
  • Loading branch information
QuentinRoy committed Jun 13, 2017
1 parent 8ead94c commit dec3a6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/scope_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@
if ( data.handleNumbers.length === 1 ) {

var handleOrigin = scope_Handles[data.handleNumbers[0]];
handle = handleOrigin.children[0];
scope_ActiveHandlesCount += 1;

// Ignore 'disabled' handles
if ( handleOrigin.hasAttribute('disabled') ) {
return false;
}

handle = handleOrigin.children[0];
scope_ActiveHandlesCount += 1;

// Mark the handle as 'active' so it can be styled.
addClass(handle, options.cssClasses.active);
}
Expand Down

0 comments on commit dec3a6c

Please sign in to comment.