[TIMOB-3452] Android: Must click TextField twice in TableViewRow in 2nd Tab inside TabGroup to display keyboard
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-10-03T21:00:35.000+0000 |
Affected Version/s | Release 1.7.0 |
Fix Version/s | n/a |
Components | Android |
Labels | android, keyboard, tbs-1.9.0, textfield |
Reporter | Paul Dowsett |
Assignee | Karl Rowley |
Created | 2011-04-15T03:45:20.000+0000 |
Updated | 2017-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
Associated helpdesk ticket: http://appc.me/c/APP-557344 As well as Kitchen Sink sample: table_view_textfield.js
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.
A user has narrowed down at least one cause of this problem: http://developer.appcelerator.com/question/123750/
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.
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.
Can't reproduce with latest version of 3.0.X
Cannot reproduce this issue with 6.0.3 GA SDK.