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

Android: textField: Property "softKeyboardOnFocus" does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: Android
    • Environment:

      Description

      When textfield in windows gain focus, the keyboard used to hide them. So i create a big scrollView and put everything inside. It worked perfectly: i was able to see what i wrote. However now, the keyboard launch itself with the windows, so i have to press back button to hide him.

      I tried myTextField.blur() but keyboard still happen.

      Only way to prevent this is to add focusable: false to my textField, but then i can not acces to the keyboard (even by adding an event to set focusable: true).

      Here is my code:

      To launch the windows in app.js:

       
      var win = Titanium.UI.createWindow({
      	backgroundColor: '#D1D1D1',
      	url: '/authentification.js',
      	navBarHidden: true,
      	fullscreen: false
      });
      win.open();
      

      and authentification.js:

       
       
      var win = Titanium.UI.currentWindow;
       
      var deviceWidth  = Titanium.Platform.displayCaps.platformWidth;
      var deviceHeight = Titanium.Platform.displayCaps.platformHeight;
       
      var MainScrollView = Titanium.UI.createScrollView({
          contentWidth:deviceWidth,
          contentHeight:deviceHeight*79/100,
          top:deviceHeight*11/100,
      	left:0
      });
       
      var view = Titanium.UI.createView({
          top: deviceHeight * 39 / 100,
      	left: deviceWidth * 4/100,
      	width: deviceWidth * 92/100,
      	height: deviceHeight * 25 / 100,
      	borderRadius: 5,
      	borderWidth: 2,
      	borderColor: '#9B9B9B',
      	backgroundColor: 'white'
      });
       
       
      var txtFieldPasswd = Titanium.UI.createTextField({
      	passwordMask:true,
      	left: deviceWidth*5/100,
      	width: deviceWidth*82/100,
      	top: deviceHeight*10/100,		
      	height: deviceHeight* 8/100,
      	softKeyboardOnFocus:1 
      });
      view.add(txtFieldPasswd);
       
      MainScrollView.add(view);
      win.add(MainScrollView);
      

        Attachments

          Activity

            People

            • Assignee:
              pwang Ping Wang
              Reporter:
              varfendell Florent
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration