CCMenu doesn't respond while CCTextFieldTTF attached with IME

Hi,
I’ve a layer with a CCTextFieldTTF and a CCMenu. While the textfield is attached with IME (i.e.: Keyboard is visible), the menu doesn’t get touches. I tried to decrease the menu priority (~~200,~~255) but the problem remains.
Here is my code in the CCLayer init:

    cocos2d::CCLabelTTF *messageLabel = ZLabels::messageLabel("Insert your name:");
    messageLabel->setPosition(cocos2d::CCPoint(getContentSize().width / 2, getContentSize().height / 2 + rowSize * 4));
    addChild(messageLabel);

    cocos2d::CCTextFieldTTF *nameText = cocos2d::CCTextFieldTTF::textFieldWithPlaceHolder("",
                                                                                          ZFonts::messageFontName(),
                                                                                          ZFonts::messageFontSize());
    nameText->setColorSpaceHolder(cocos2d::ccc3(255,250,9));
    nameText->setColor(cocos2d::ccc3(255,250,9));

    nameText->setPosition(cocos2d::CCPoint(getContentSize().width / 2, getContentSize().height / 2 + rowSize * 3));
    nameText->setDelegate(this);
    addChild(nameText);
    nameText->attachWithIME();

    m_menu = cocos2d::CCMenu::create(cocos2d::CCMenuItemLabel::create(ZLabels::messageLabel("Save"),
                                                                                     m_selectorTarget,
                                                                                     m_notifyUserName),
                                                    cocos2d::CCMenuItemLabel::create(ZLabels::messageLabel("Cancel"),
                                                                                     m_selectorTarget,
                                                                                     m_closeDialog),
                                                    NULL);
    m_menu->alignItemsHorizontallyWithPadding(40.0);
    m_menu->setPosition(cocos2d::CCPoint(getContentSize().width / 2, getContentSize().height / 2 + rowSize * 1));
    addChild(m_menu);

Thanks for the help.

Giannandrea

Hi,

I just met the similar problem two days ago.
And I have resolved it by myself.
Maybe you can find “libs/cocos2dx/platform/ios/EAGLView.mm”, then open EAGLView.mm.
It returned in line 399, 420, 440 and 461.
Just comment it.
I have also attempted to find such codes on android platform, but I’m wrong.
When I test it on android platform, it works well.

I hope this will help you.
Best wishes.