From dec3a6c760e52a20ebd493c40083667604f7baf4 Mon Sep 17 00:00:00 2001 From: Quentin Roy Date: Tue, 13 Jun 2017 15:17:57 +0800 Subject: [PATCH] Fix a minor bug making disabled handle to be counted in the activeHandlesCount. This fix allows the drag class to be properly removed when a drag stops, even if disabled handles are the target of touches. --- src/js/scope_events.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/scope_events.js b/src/js/scope_events.js index e78bb61b..2bc2bd6c 100644 --- a/src/js/scope_events.js +++ b/src/js/scope_events.js @@ -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); }