From 84e9020f619860de9da6ae04230b5fa5d1e9f633 Mon Sep 17 00:00:00 2001 From: Adrian Vasiliu Date: Tue, 4 Mar 2014 13:41:18 +0100 Subject: [PATCH] Fixes #17165: during a scroll animation, touchstart should not trigger the selection of the item --- mobile/_ItemBase.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mobile/_ItemBase.js b/mobile/_ItemBase.js index b1773da1c1..f0199c6226 100644 --- a/mobile/_ItemBase.js +++ b/mobile/_ItemBase.js @@ -12,8 +12,10 @@ define([ "./TransitionEvent", "./iconUtils", "./sniff", + "./viewRegistry", "dojo/has!dojo-bidi?dojox/mobile/bidi/_ItemBase" -], function(array, declare, lang, win, domClass, touch, registry, Contained, Container, WidgetBase, TransitionEvent, iconUtils, has, BidiItemBase){ +], function(array, declare, lang, win, domClass, touch, registry, Contained, Container, + WidgetBase, TransitionEvent, iconUtils, has, viewRegistry, BidiItemBase){ // module: // dojox/mobile/_ItemBase @@ -319,6 +321,12 @@ define([ // tags: // private if(this.getParent().isEditing || this.onTouchStart(e) === false){ return; } // user's touchStart action + var enclosingScrollable = viewRegistry.getEnclosingScrollable(this.domNode); + if(enclosingScrollable && + domClass.contains(enclosingScrollable.containerNode, "mblScrollableScrollTo2")){ + // #17165: do not select the item during scroll animation + return; + } if(!this._onTouchEndHandle && this._selStartMethod === "touch"){ // Connect to the entire window. Otherwise, fail to receive // events if operation is performed outside this widget.