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

iOS: TextField focus() event not fired when application loads in landscape mode as iPhone app on iPad

    Details

      Description

      Problem description
      When the app loads in landscape mode on iPad (as an iPhone app), the text field focus events are not fired when tapping on the fields. However, once a device rotation occurs, it starts working.

      Test case

      var win = Ti.UI.createWindow({
      	backgroundColor : '#000'
      });
       
      var registerUsername = Titanium.UI.createTextField({
      	hintText : 'User ID',
      	height : 40,
      	left : 10,
      	top : 80,
      	width : Ti.Platform.displayCaps.platformWidth - 40,
      	borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
      });
      var registerPassword = Titanium.UI.createTextField({
      	hintText : 'Password',
      	height : 40,
      	left : 10,
      	top : 40,
      	passwordMask : true,
      	width : Ti.Platform.displayCaps.platformWidth - 40,
      	borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
      });
      win.add(registerUsername);
      win.add(registerPassword);
       
      registerUsername.addEventListener('focus', function() {
      	Ti.API.info("Register Username: Focus Event");
      });
      registerPassword.addEventListener('focus', function() {
      	Ti.API.info("Register Password: Focus Event");
      });
       
      win.open();
      

      tiapp.xml changes

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                dsefton Daniel Sefton
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration