Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3451] Android: TextField in TableViewRow in 2nd Tab in TabGroup loses focus on keyboard display

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-05-29T16:56:44.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sn/a
ComponentsAndroid
LabelsSupportTeam, api
ReporterPaul Dowsett
AssigneeHieu Pham
Created2011-04-15T03:45:20.000+0000
Updated2017-03-21T22:40:37.000+0000

Description

Environment:

  • TiDev 1.2.2
  • Ti SDK 2.0.1GA2
  • Android SDK 2.2
  • tested in emulator only

This issue was first discovered by user "JH" in this http://developer.appcelerator.com/question/117540/textfield-on-tableview-loses-focus-android#"> Q&A post

With a textField added to a tableViewRow on a secondary tab, the user clicks it and the keyboard appears but the textField loses focus. This is demonstrated by the following code:

var win1 = Ti.UI.createWindow({
  title:"Window 1"
});

var tab1 = Ti.UI.createTab({
  title:"Tab 1",
  window: win1
});
 
var win2 = Ti.UI.createWindow({
  title:"Window 2"
});

var row = Ti.UI.createTableViewRow({});
var tF = Ti.UI.createTextField({
//  keyboardType:Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION, // another issue reported in next ticket
  width:300
});

row.add(tF);
var tV = Ti.UI.createTableView({data:[row]});
//win1.add(tV); // this works as expected
win2.add(tV); // this demonstrates the issue
 
var tab2 = Ti.UI.createTab({  
  title:'Tab 2',
  window: win2
});
 
var tabGroup = Ti.UI.createTabGroup();
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();

The issue does not exist when a tableView or tabGroup are not used, and 1.5.1 exhibits the correct behavior

Comments

  1. Anirudh Nagesh 2011-06-27

    Changing customer priority to 'within release' as we have customers relying on this requirement. Associated helpdesk ticket: http://appc.me/c/APP-515579
  2. Eduardo Gomez 2011-06-28

    Associated helpdesk ticket: http://appc.me/c/APP-557344 As well as Kitchen Sink sample: table_view_textfield.js
  3. Josh Roesslein 2012-04-17

    Linking with TIMOB-8332 since the cause appears to be the same and this issue is resolved by the same fix.
  4. Varun Joshi 2012-05-16

    The issue exists in the latest master build.
  5. Hieu Pham 2012-05-29

    This is the same issue as timob-8332. Resolving as Won't Fix.
  6. Lee Morris 2017-03-21

    Closing ticket as duplicate.

JSON Source