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(); } });