Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10972

iOS 6: Window orientation modes are neglected for second level child window

    Details

      Description

      This is not a regression. It occurs on 2.1.2 also on iOS 6 device/simulator. It works fine on iOS 5.

      If you have 3 windows - one parent,one child and third one grandchild, each with their set of orientationmodes,then orientationmodes of grandchild window are over ruled by the child window.

      Steps to reproduce:
      1. Use the code below-

      var _window = Ti.UI.createWindow({
      	orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT],
      });
       
      		var aBtn = Ti.UI.createButton({
      			title:'open',
      			height: 100,
      			width: 100
      		});
      		
      		aBtn.addEventListener('click', function(){
      			var toplevel = Ti.UI.createWindow({
      				orientationModes : [Ti.UI.PORTRAIT, Ti.UI.UPSIDE_PORTRAIT],
      				backgroundColor : 'blue'
      			});
       
      			var btn = Ti.UI.createButton({
      				title:'close',
      				height: 100,
      				width: 100
      			});
      		
      			btn.addEventListener('click', function() {
      		    	toplevel.close();
      			});
      			toplevel.add(btn);
      		
      			var win = Ti.UI.createWindow({
      				orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT],
      				backgroundColor : 'green'
      			});
       
      			var b = Ti.UI.createButton({
      				title : 'open',
      				width : 100,
      				height : 50,
      				bottom:0
      			});
      			b.addEventListener('click', function() {
      				win.open({
      					modal : true
      				});
      			});
       
      			var b3 = Ti.UI.createButton({
      				title : 'close',
      				width : 100,
      				height : 50,
      				bottom : 20
      			});
      			b3.addEventListener('click', function() {
      				win.close();
      			});
       
      			toplevel.add(b);
      			win.add(b3);
      			toplevel.open(); 
      		});
      		
      _window.add(aBtn);
      _window.open();
      

      2. Click 'open' button
      3. Click 'open' button again

      Expected result:
      1. A black window with 'open' button should get displayed in landscape mode.
      2. A blue window with 'open' and 'close' button should get displayed in portrait mode.
      3. A green window with 'close' button should get displayed in landscape mode.

      Actual result:
      1. A black window with 'open' button gets displayed in landscape mode.
      2. A blue window with 'open' and 'close' button gets displayed in portrait mode.
      3. A green window with 'close' button gets displayed in portrait mode.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                sbhadauria Shyam Bhadauria
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-14312
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration