about EditBox editBoxReturn

        var img1    =cc.Scale9Sprite.createWithSpriteFrameName("white_box.png");
        this.box1    =cc.EditBox.create(cc.size(462,76),img1);
        this.box1.setPlaceHolder("点击输入聊天内容");
        this.box1.setReturnType(2);
        this.box1.setDelegate(this);
        this.main_layer.addChild(this.box1,100);

       ...


UI_ChatBox.prototype.editBoxReturn =function(editbox){
    cc.log("editbox send:"+editbox.getText());
}

I Click the Keyboard’s SEND button and click on the screen
are elsewhere triggered editBoxReturn events…

Do you mean clicking outside of keyboard also trigger return event of editbox?

Which version of cocos2d-x are you using?

James Chen wrote:

Do you mean clicking outside of keyboard also trigger return event of editbox?

yes,i use cocos2d-x 2.14

Could you try `TestJavascript/ExtensionsTest/EditBoxTest` to see whether it happens too.

James Chen wrote:

Could you try `TestJavascript/ExtensionsTest/EditBoxTest` to see whether it happens too.

i use EditBoxTest and clicking outside of keyboard also trigger editBoxReturn

Cocos2d: JS: editBox box1 DidBegin !

Cocos2d: offestY = 0.000000
2013-08-16 10:54:57.075 TestJavascript[19301:907] cocos2d: surface size: 960x640
Cocos2d: offestY = 0.000000
Cocos2d: textFieldShouldEndEditing…
*Cocos2d: JS: editBox box1 DidEnd ![](

Cocos2d: JS: editBox box1 was returned )*

Cocos2d: offestY = 0.000000
Cocos2d: offestY = 0.000000

In cocos2d-x 2.1.5, This problem is still not Fixed…