[TIMOB-15297] iOS7: KeyboardToolbar disappears when toggling between textfields
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-09-20T19:23:13.000+0000 |
Affected Version/s | Release 3.1.3 |
Fix Version/s | 2013 Sprint 19, 2013 Sprint 19 API |
Components | iOS |
Labels | ios7, regression, triage |
Reporter | Meenakshi Pathak |
Assignee | Vishal Duggal |
Created | 2013-09-20T11:36:03.000+0000 |
Updated | 2017-03-29T16:38:37.000+0000 |
Description
KeyboardToolbar of textfields disappears while toggling between the textfields.
*Steps To Reproduce*:
1. Copy and paste the below code in newly created Titanium project:
var win = Ti.UI.createWindow({
backgroundColor:'white'
});
var previous = Titanium.UI.createButton({
title :'Previous',
style :Titanium.UI.iPhone.SystemButtonStyle.DONE,
});
var next = Titanium.UI.createButton({
title :'Next',
style :Titanium.UI.iPhone.SystemButtonStyle.DONE,
});
var username = Titanium.UI.createTextField({
width : '88.1%',
height : '8.9%',
hintText : 'NT USERNAME',
top : 50,
borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
autocapitalization : Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,
keyboardToolbar : [previous, next]
});
var password = Titanium.UI.createTextField({
width : '88.1%',
height : '8.9%',
hintText : 'NT PASSWORD',
top : 100,
borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
passwordMask : true,
autocapitalization : Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,
keyboardToolbar : [previous, next]
});
previous.addEventListener('click', function (e) {
username.focus();
});
next.addEventListener('click', function (e) {
password.focus();
});
username.addEventListener('focus', function (e) {
previous.enabled=false; next.enabled=true;
});
password.addEventListener('focus', function (e) {
previous.enabled=true; next.enabled=false;
});
win.add(username);
win.add(password);
win.open();
2. Run the app on iOS7 and toggle between textfields.
*Note* :This behavior is specifically on iOS7. This issue can not be seen on iOS6 and SDK 3.1.0.Find the attachment of blank KeyboardToolBar after toggling between textFields.
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2013-09-20 at 5.03.48 PM.png | 2013-09-20T11:36:03.000+0000 | 46630 |
You can not use the same view proxies in two different toolbars. You can however use the same toolbar on two different view proxies (although that too is considered bad UI design) Create a toolbar explicitly and set it to the textfields. To get the toolbar switching effect use 4 buttons or 2 toolbars. Code with single toolbar:
Closing ticket as invalid.