Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14491] iOS: textfield in tableViewRow undesirable keyboardType change

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2013-09-06T19:54:45.000+0000
Affected Version/sRelease 3.1.0, Release 3.1.1
Fix Version/s2013 Sprint 18, 2013 Sprint 18 API
ComponentsiOS
LabelssupportTeam
ReporterRupesh Sharma
AssigneeVishal Duggal
Created2013-07-05T06:40:53.000+0000
Updated2017-03-22T18:09:20.000+0000

Description

Description

In a tableViewRow having textfield when user change the keyboardType to 123 and as soon as we enter any key keyBoardType changes to ABC.

Test Case

Reproduce this simply by adding a tableview to a window where the tableview has 1 row and the row has a textfield. No special properties or event listeners. If you give focus to the textfield by touching/clicking and the keyboard comes up as expected. Now change the keyboard type while its up from ABC to 123 and type a number - as soon as you enter a key the keyboard seems to flash (as if some event fired) and it reverts back to the ABC after entering the value you typed into the textfield.
var tableData = [];

var win = Ti.UI.createWindow({ backgroundColor: 'white' });

var table = Ti.UI.createTableView({ objName: 'table' });


  var row = Ti.UI.createTableViewRow({
    className: 'row',
    objName: 'row',
    touchEnabled: true,
    height: 100
  });
  
 var txtfield=Ti.UI.createTextField({
 	borderColor : 'black'
 });
 
 row.add(txtfield);
 
 tableData.push(row);

table.setData(tableData);

win.add(table);
win.open();

Comments

  1. Vishal Duggal 2013-07-22

    Happening because the textfield is set for autosizing. So when text changes we have to refresh the tableView row which resets the keyboard. Give the textfield fixed width and height and the problem should go away.
  2. Vishal Duggal 2013-09-06

    If the tableView row has to reload, any focussed elements will lose focus. After reload we refocus the element. At this point the keyboard will come up in its default config. Can't fix this.
  3. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source