Issue
Keypad is displayed in the middle of the window on iOS closing a child window, i.e. as seen in the screenshot attached.
Tested on
iOS simulator 4.3 & 5
iPhone 4
Reproduction steps
1. Launch the app
2. click on the text field, click the return key
3. window 2 will open in the landscape mode.
4. tilt the phone to landscape.
5. click on the window2. it will close and display parent window
6. once parent window is displayed, click on the text field
7. tilt the phone to portrait.
Repro sequence
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
// create base UI tab and root window
//
tabGroup.addEventListener('focus',function(e){
win1.orientationModes=[
Titanium.UI.PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
});
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
win1.orientationModes=[
Titanium.UI.PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
gl = {};
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
var winTxtField = Titanium.UI.createTextField({
color:'#ff7c00',
font: {
fontSize:16,
fontWeight:'bold',
fontFamily:'Helvetica Neue'
},
top:9,
textAlign : 'right',
height:46,
bottom:15,
width: '100%',
keyboardType:Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION,
returnKeyType:Titanium.UI.RETURNKEY_DEFAULT,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
borderColor:'blue',
borderWidth:2
});
Ti.include('win2.js');
winTxtField.addEventListener('return',function(){
gl.createNewWindow();
});
win1.add(winTxtField);
tabGroup.addTab(tab1);
tabGroup.open();
gl.createNewWindow = function(){
var win2 = Titanium.UI.createWindow({
title:'I am window2',
backgroundColor:'blue'
});
win2.orientationModes=[
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
win2.open();
win2.addEventListener('click',function(e){
//winTxtField.focus();//don't need this
//Ti.UI.orientation = Ti.UI.PORTRAIT;//if you need to update to PORTRAIT mode
//Ti.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);
Ti.UI.orientation = Titanium.Gesture.orientation;
win2.close();
});
};
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced.