Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3158] Textfield in keyboard toolbar doesn't react to focus() and blur() messages

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2011-10-20T09:12:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsdefect,, ios,, keyboardtoolbar, textfield,
ReporterOlivier Morandi
AssigneeMatthew Apperson
Created2011-08-24T01:42:36.000+0000
Updated2016-03-08T07:48:13.000+0000

Description

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.

Attachments

FileDateSize
app.js2011-08-24T01:42:36.000+0000788

Comments

  1. Matthew Apperson 2011-10-20

    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

JSON Source