Touches to an Editbox are being blocked by its Parent Layer.

Hi,

I’m facing an issue where I’m creating a new layer(child of an existing layer) and adding editbox children to this new layer. Although the zorder is correct(the editboxes are being drawn on top of the new layer), the touches aren’t being registered. This is the code I’m using for registering this new layer and its children.

void ChangePasswordLayer::registerWithTouchDispatcher()
{
#if (CC_TARGET_PLATFORM CC_PLATFORM_IOS)
CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, myTouchPriority, true);

#elif (CC_TARGET_PLATFORM CC_PLATFORM_ANDROID)

currentPWEditBox~~>setHandlerPriority;
newPWEditBox~~>setHandlerPriority(myTouchPriority - 1);
newPW2EditBox->setHandlerPriority(myTouchPriority - 1);

CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, myTouchPriority, true);
#endif

}

If I were to set the layer not to swallow touches, I can tap on and activate the editboxes as usual. The above code works fine on IOS devices and other non editbox related nodes/layers, so I’m quite puzzled and seeking advice.

Thanks.