Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix editbox out of works after #1540



Copy link

commented Oct 11, 2018

  • g_textInputCallback 是全局的,在重启后,内部的方法失效了,同时也没自动重置为 Undefined。(类似重启后,变为了野指针。)

  • 增加一个额外检测,去获取内部方法,如果获取成功,才认为 g_textInputCallback 变量正常,不需要重新获取。

在 iOS & Android & mac 上验证,重启后 EditBox 工作正常

@drelaptop drelaptop requested a review from minggo Oct 11, 2018
@drelaptop drelaptop removed the request for review from minggo Oct 11, 2018

This comment has been minimized.

Copy link
Contributor Author

commented Oct 11, 2018

这是一个比较小的 bug fix,我直接合并了。

@drelaptop drelaptop merged commit 8e38ac2 into cocos-creator:v2.1-release Oct 11, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
drelaptop added a commit to drelaptop/cocos2d-x-lite that referenced this pull request Oct 31, 2018
drelaptop added a commit that referenced this pull request Oct 31, 2018
* Revert " fix editbox out of works after (#1540)"

This reverts commit 8e38ac2.

* free global g_textInputCallback before ScriptEngine clean up

* format beauty: tab -> space in editbox-android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.