Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6391] iOS: Window: iPad only, opening and closing a modal window with split view cause the view to be displaced

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-12-04T22:51:22.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-48, Release 1.8.0.1
ComponentsiOS
Labelsqe-ios112911, qe-port, regression
ReporterNatalie Huynh
AssigneeStephen Tramer
Created2011-11-30T14:21:02.000+0000
Updated2014-06-19T12:43:40.000+0000

Description

Steps to Reproduce: 1. Launch KS-iPad 2. Split View - Plain 3. Click Show Modal 4. Click Dismiss modal Actual: the view to be displaced Expected: Should be displayed like the launched view

Comments

  1. Stephen Tramer 2011-12-01

    git bisect identifies the offending commit as 508ad73967f7fbfa9aad3b11be48c0938a289aa4.
  2. Stephen Tramer 2011-12-01

    Regression introduced by fix for linked bugs.
  3. Stephen Tramer 2011-12-01

    Should also be mentioned that opening the modal forces the device into portrait, even though the modal explicitly states it supports all orientation modes. It should be appearing in landscape when opened; this is also a regression. Note that this only happens IF the original window was opened in portrait orientation, then the device NOT manually rotated into a landscape orientation. It could actually be an iOS bug and will not be addressed in a fix for this issue. *BONUS*: Turns out that it IS fixed by the pull request for this! Awesome.
  4. Stephen Tramer 2011-12-04

    The regression itself is resolved by pull 809. The behavior the pull is being rejected for has always existed, and is not a regression, but is being documented.
  5. Stephen Tramer 2011-12-04

    A brief discussion of why the doc change goes in, and why we can't fix this on short notice: It turns out that as part of the modal transition, the transform on the initial view is *ALWAYS* set to the identity transform. In the case of the reported issue (weird redraw of the split view when closing the modal in upside-portrait) here's what was happening: * The transform the modal is currently in is saved * The transform is set to the identity transform * The split view renders given the identity transform * The split view is rotated according to the correct Landscape mode (the one it was previously in) by setting the transform there * Then, once the modal transition is complete, the ORIGINAL transform (for portrait-upside) is re-applied, causing further visual issues with the split rendering. The steps in which the modal transition is manually managing the transform can't be adjusted by us; the problem is both when we're rendering, and when we're cuing rotation. Doing either differently could lead to even *worse* visual problems.
  6. Blain Hamon 2011-12-04

    Adding new test case:
       var win = Titanium.UI.createWindow();
       win.orientationModes = [
       	Titanium.UI.PORTRAIT,
       	Titanium.UI.UPSIDE_PORTRAIT,
       	Titanium.UI.LANDSCAPE_LEFT,
       	Titanium.UI.LANDSCAPE_RIGHT,
       ]; 
       
       var b1 = Titanium.UI.createButton({
       	title:'Show camera',
       	width:200,
       	height:40,
       	top:40
       });
       b1.addEventListener('click', function()
       {
       	Titanium.Media.openPhotoGallery({
       	
       		success:function(event)
       		{
       			Ti.API.debug('Success!');		
       		},
       		cancel:function()
       		{
       		},
       		allowEditing:true
       	});
       });
       win.add(b1);
       
       win.open();
       
    Launch for iPhone in landscape. Press button. Portrait modal should appear. Leave physically in landscape. Dismiss modal with cancel. Window should be in landscape.
  7. Wilson Luu 2011-12-06

    Closing bug. Verified fix on: Studio: Titanium Studio, build: 1.0.7.201112052104 OS: Mac OS X Lion SDK Build: 1.8.0.1.v20111205164258 Device: ipad 2 (4.3.5)

JSON Source