Merge pull request #13243 from jianglong0156/fixExitButton

[ci skip]fix the close button function in main list frame
This commit is contained in:
pandamicro 2015-08-06 17:33:47 +08:00
commit 7a758bb961
1 changed files with 7 additions and 1 deletions

View File

@ -200,7 +200,13 @@ var TestController = cc.LayerGradient.extend({
}, this);
},
onCloseCallback:function () {
window.history && window.history.go(-1);
if (cc.sys.isNative)
{
cc.director.end();
}
else {
window.history && window.history.go(-1);
}
},
onToggleAutoTest:function() {
autoTestEnabled = !autoTestEnabled;