Problems about ControlEditBox

Problems about ControlEditBox
0.0 0


Hi, I’m recently using Cocos2d-html (really cool stuff). I got some problems when using ControlEditBox.

  1. Chrome reports “Uncaught TypeError: Cannot read property ‘length’ of undefined” in function onBlurFocusHandle
    if ((this.value.length == 0) && (this._tooltipTxt.length > 0)) {
    Seems this._tooltipTxt is undefined

  2. When switching from one scene (without ControlEditBox) to another (with a ControlEditBox) with some transition effect, the ControlEditBox shows up immediately (I mean no transition effect). Did I miss something?

  3. ControlEditBox use a different coordinate system from other sprites. Based on my experiments, for a ControlEditBox (0, 0) is the top left corner of the layer. Right?

Could someone help answer my questions?


Another issue:
When design resolution size is different from the canvas size, the text doesn’t show inside the box.


It has been fixed. Could you please upgrade your engine version to develop branch?

Or you can refer to this commit


Thanks, Lin:)


Hi Shun Lin. I switched to the develop branch but seems the issue is not fixed yet.
Steps to reproduce:

  • Modify samples/tests/index.html, change the canvas size to (640, 360)
- Modify samples/tests/main.js, add the following line. cc.EGLView.getInstance().setDesignResolutionSize(800, 450, cc.RESOLUTION\_POLICY.SHOW\_ALL); Then run the testcase.


Any comments? Or I missed something?


Sorry for late reply.

I have reproduced it. It will be fixed soon. Thanks for testing it.