From c1813908818639bbf4b090ef6fb5353725b87154 Mon Sep 17 00:00:00 2001 From: XiaoFeng Date: Wed, 23 Dec 2015 15:32:27 +0800 Subject: [PATCH] Fix in js-test, after UITest->UIFocus tests, in all other test scene when button clicked program will crash --- tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js b/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js index 27ea0e2164..a5fbe81074 100644 --- a/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js +++ b/tests/js-tests/src/GUITest/UIFocusTest/UIFocusTest.js @@ -106,6 +106,10 @@ var UIFocusTestBase = UIMainLayer.extend({ widget.setColor(cc.color.WHITE); } } + }, + onExit:function () { + cc.eventManager.removeListener(this._eventListener); + this._super(); } });