Skip to content

Commit 24991e2

Browse files
committed
Closed #3342: UIWidget's container intercept touch event while they shouldn't
Resolved with a simple check before the interception
1 parent 27663d4 commit 24991e2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ ccs.UIListView = ccs.UILayout.extend({
434434
* @param {cc.Point} touchPoint
435435
*/
436436
checkChildInfo: function (handleState, sender, touchPoint) {
437-
this.interceptTouchEvent(handleState, sender, touchPoint);
437+
if(this._enabled && this._touchEnabled)
438+
this.interceptTouchEvent(handleState, sender, touchPoint);
438439
},
439440

440441
moveChildren: function (offset) {

extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ ccs.UIPageView = ccs.UILayout.extend({
494494
},
495495

496496
checkChildInfo: function (handleState, sender, touchPoint) {
497-
this.interceptTouchEvent(handleState, sender, touchPoint);
497+
if(this._enabled && this._touchEnabled)
498+
this.interceptTouchEvent(handleState, sender, touchPoint);
498499
},
499500

500501
interceptTouchEvent: function (handleState, sender, touchPoint) {

extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,8 @@ ccs.UIScrollView = ccs.UILayout.extend({
13021302
* @param {cc.Point} touchPoint
13031303
*/
13041304
checkChildInfo: function (handleState, sender, touchPoint) {
1305-
this.interceptTouchEvent(handleState, sender, touchPoint);
1305+
if(this._enabled && this._touchEnabled)
1306+
this.interceptTouchEvent(handleState, sender, touchPoint);
13061307
},
13071308

13081309
scrollToTopEvent: function () {

0 commit comments

Comments
 (0)