Related to Q&A questions:
http://developer.appcelerator.com/question/50211/keyboardtoolbar---textfield-focus
http://developer.appcelerator.com/question/107891/textfield-focus-on-toolbar
checked with 1.8.0 (as of master:f7c0117f8ec88704e1cc51fb82ff55cdf0c327f6)
A textfield in a keyboard toolbar, like the one in the textfield_toolbar.js example in kitchensink, will never receive focus()/blur() messages. The issue seems related to somewhat too much strict checks in TiUITextWidgetProxy.m. In particular, a check is performed on [self viewAttached], which resolves to (view != nil && windowOpened). However, in my understanding, the keyboard toolbar lives in a separately managed window with the keyboard view, so there's no mean to notify the subview proxies when that window gets opened or closed.
In a project I'm following, I've been able to overcome the problem by relaxing those checks (simply not checking for windowOpened), however this doesn't looks to me as a "general solution", as I'm not sure which side effects it might have.
I attach a test case.
expected: clicking on the textfield on top of the window should fire the keyboard w/ a toolbar containing another textfield, and focus should be passed to the textfield in the toolbar
Current: the keyboard w/ toolbar gets fired but the focus remains on the main textfield.
Olivier, The information contained in your ticket is adequate, however if I could just ask you to please update the format, that would be great. For small code samples we rather the code be in the description using the ``` tags rather then an attachment. Also if you could update the environment with the TiSDK and iOS SDK you used. Once this is done I can accept this ticket. For a full outline of all required information, please see our JIRA checklist here - http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist Best regards, Matt