Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8072] iOS: Keypad transition is not animated when device orientation changes

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-04T04:38:39.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.2
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsn/a
ReporterEduardo Gomez
AssigneeShameer Jan
Created2012-03-18T16:30:42.000+0000
Updated2017-03-17T18:45:27.000+0000

Description

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();
 });
};

Comments

  1. Shameer Jan 2013-04-04

    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
  2. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source