Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7839] iOS: MODAL_PRESENTATION_FORMSHEET window while in landscape displays partially offscreen

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-06T10:58:13.000+0000
Affected Version/sRelease 1.8.1
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsiOS
Labelsmodule_window, qe-testadded
ReporterVarun Joshi
AssigneeBlain Hamon
Created2012-02-28T10:40:49.000+0000
Updated2013-08-30T10:26:12.000+0000

Description

This issue occurs if modalStyle with Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET and modalTransitionStyle with MODAL_TRANSITION_STYLE_CROSS_DISSOLVE properties are used together with a textfield in *iPad*. Please run the attached sample app.js to confirm this issue. Here are the steps: 1. Start the app. 2. Put the iPad Simulator in landscape mode. 3. Click on the textfield and then click on the "Click" button. 4. The modal window goes off-screen to the far left of the simulator. This does not happen with any other modal window style properties. Here is the app.js file: {noformat} var win = Ti.UI.createWindow({ top: 0, left: 0, backgroundColor:'orange', width: Ti.Platform.displayCaps.platformWidth, height: Ti.Platform.displayCaps.platformHeight, orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT, Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT] }); var button = Ti.UI.createButton({ top: 100, left: 100, height: 50, title:'Click', backgroundColor: 'blue' }); // Adding this field causes the CROSS_DISSOLVE TO NOT WORK var text = Ti.UI.createTextField({ top: 200, left: 100, width:400, height:50, hintText:'Put cursor in here and click button above', keyboardType:Ti.UI.KEYBOARD_DEFAULT, borderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED, autocorrect: false }); win.add(text); win.add(button); button.addEventListener('click', function(){ var closeBtn = Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.DONE }); var w = Titanium.UI.createWindow({ title:'Add Location', backgroundColor:'red', // opacity:1.0, rightNavButton: closeBtn //barColor:'#000000' }); w.open({ modal: true, modalTransitionStyle: Ti.UI.iPhone.MODAL_TRANSITION_STYLE_CROSS_DISSOLVE,//Ti.UI.iPhone.MODAL_TRANSITION_STYLE_FLIP_HORIZONTAL, modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET // navBarHidden: false }); w.add(closeBtn); closeBtn.addEventListener('click', function(e){ // Clean up all visual objects. w.close(); w = null; closeBtn = null; }); }); win.open(); {noformat}

Comments

  1. Blain Hamon 2012-03-05

    Pull #1560 is now pending.
  2. Michael Pettiford 2012-03-08

    Closing issue Tested with Ti Studio build 1.0.9.201202141208 Ti Mob SDK 2.0.0.v20120308093239 OSX Lion 10.7.3 Expected result of modal transition style working correctly is shown

JSON Source