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

iOS8: iPad Alert dialog does not consider window orientation modes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 3.4.0
    • Fix Version/s: Release 3.4.0, Release 3.5.0
    • Component/s: iOS
    • Environment:
    • Story Points:
      5
    • Sprint:
      2014 Sprint 18 SDK

      Description

      Description

      We have modal window and a button. when user clicks on the button alert pops up.
      The app is supposed to have only portrait orientation which is set in tiApp.xml file.
      When alert pops up, the device supports orientation change.

      Testcase

      Step to reproduce:
      1.Tap on the button in the main window,which opens modal window.
      2.Tap on the button in modal window that brings up alert dialog.
      3.Try rotating the device and orientation is supported

       
      //app.js
      var win = Ti.UI.createWindow({
      backgroundColor : '#fff',
          
      orientationModes : [Ti.UI.PORTRAIT] //to be sure
      });
       
       
      var clickMeBtn = Ti.UI.createButton({
       
      title : 'Click to open modal window'
      });
       
      var cancelBtn = Ti.UI.createButton({
       
      title : 'cancel'
      });
       
      var modalWin = Ti.UI.createWindow({
      backgroundColor : '#bbb',
          
      modal : true,
          
      orientationModes : [Ti.UI.PORTRAIT] //to be extra double sure
      });
       
      var modalButton = Ti.UI.createButton({
      title : 'Click to test Orientation'
      });
      modalWin.add(modalButton); 
      modalWin.setLeftNavButton(cancelBtn);
       
      win.add(clickMeBtn);
        
       
      clickMeBtn.addEventListener('click',function(_event){
       
       modalWin.open();
       
      });
       
      modalButton.addEventListener('click', function(e) {
         var dialog = Ti.UI.createAlertDialog({
          message: 'Rotate device to see the orientaion change',
          ok: 'Okay',
          title: 'File Deleted'
        }).show(); 
      //alert('Rotate device to see the orientaion change');
      });
       
      cancelBtn.addEventListener('click', function(e){
      	modalWin.close();
      });
       
      win.open();
      

      In tiapp.xml

      <iphone>
              <orientations device="iphone">
                  <orientation>Ti.UI.PORTRAIT</orientation>
              </orientations>
              <orientations device="ipad">
                  <orientation>Ti.UI.PORTRAIT</orientation>
              </orientations>
      </iphone>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                oromero Olga Romero
                Reviewer:
                Jon Alter
                Tester:
                Olga Romero
              • Watchers:
                0 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code