Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3452] Android: Must click TextField twice in TableViewRow in 2nd Tab inside TabGroup to display keyboard

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-10-03T21:00:35.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, keyboard, tbs-1.9.0, textfield
ReporterPaul Dowsett
AssigneeKarl Rowley
Created2011-04-15T03:45:20.000+0000
Updated2017-03-24T21:47:59.000+0000

Description

Environment:

  • TiDev 1.2.2
  • Ti SDK 1.6.1
  • 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 must click it twice to display a numeric keyboard. 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,
  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

  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. Shannon Hicks 2011-06-29

    Not sure if this really impacts the ticket, but I found that clicking a second time only works on stock Android (Nexus One). When I tried on HTC Sense (Droid Incredible) and MotoBlur (Droid X), I could never actually get the focus to work.
  4. Shannon Hicks 2011-08-04

    A user has narrowed down at least one cause of this problem: http://developer.appcelerator.com/question/123750/
  5. Steve Lacey 2011-11-04

    Is this not being looked into further? Is there a workaround? I'm stilling experiencing this issue and don't fancy rewriting my stuff to avoid tableviews just for Android.
  6. Ivan Skugor 2011-11-04

  7. Karl Rowley 2012-09-26

    Can't reproduce with the latest set of android tableview fixes. The tickets are TIMOB-10238, TIMOB-10458, and TIMOB-10712. Note that the pull requests for TIMOB-10458 and TIMOB-10712 are still pending.
  8. Karl Rowley 2012-10-03

    Can't reproduce with latest version of 3.0.X
  9. Lee Morris 2017-03-24

    Cannot reproduce this issue with 6.0.3 GA SDK.

JSON Source