The Cceditbox object is added to a layer, and when the layer moves, the input cursor remains in place in the EditBox input state, which appears to be the cursor offset
If the editbox added at the beginning is not inside the screen, the cursor will appear at the edge of the screen
See this article for a moment
Http://www.cnblogs.com/lan0725/p/3210963.html
The position of the input cursor is called only in SetPosition and OnEnter two methods
In this case, you just need to add a location to the began.
LocalPointx = - LocalPointy = - Local functionEditboxtexteventhandle (Streventname,psender)LocalEdit = Tolua.cast (Psender,"Cceditbox") ifStreventname = ="began" Thenedit:setposition (CCP (Pointx, pointy))--default --Other methods ElseIfStreventname = ="ended" Then End End LocalPeditbox = Cceditbox:create (Editboxsize, Ccscale9sprite:create ("Green_edit.png") ) peditbox:setposition (Pointx, pointy) peditbox:setinputmode (keditboxinputmodephonenumber) PEditBox:setFontN Ame ("Arial") Peditbox:setfontsize ( -) Peditbox:setfontcolor (CCC3 (255,0,0)) Peditbox:setplaceholder (1)--Default ValuePeditbox:setplaceholderfontcolor (CCC3 (0,0,255)) Peditbox:setmaxlength (8) Peditbox:setreturntype (kkeyboardreturntypedone)--HandlerPeditbox:registerscripteditboxhandler (Editboxtexteventhandle) layer:addchild (Peditbox)