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

Android: hideSoftKeyboard() not working as of 8.2.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 8.2.1
    • Fix Version/s: Release 8.3.0
    • Component/s: Android
    • Environment:

      Description

      Issue:
      Soft Keyboard is not hiding using this method "Ti.UI.Android.hideSoftKeyboard()" on android version 8, 9 and 10. It works as expected with Ti SDK 8.2.0.GA but does not work with TI SDK 8.2.1.GA

      Please see the attached gif image. Same code using 8.2.1.GA left side, using 8.2.0.GA right side.

      Steps to Reproduce:
      1. Run the following sample code on an android device or emulator.
      2. Click on the textField for appearing keyboard.
      3. Then click on the button for hiding it.

      	var win = Ti.UI.createWindow({
      		backgroundColor : 'white',
      		layout : "vertical"
      	});
       
      	var textField = Ti.UI.createTextField({
      		backgroundColor : '#fafafa',
      		color : 'green',
      		width : 250,
      		top : 30,
      		height : 40
      	});
       
      	// Create a Button.
      	var test = Ti.UI.createButton({
      		title : 'test',
      		height : 50,
      		width : 100,
      		top : 30,
       
      	});
       
      	// Listen for click events.
      	test.addEventListener('click', function() {
      		Ti.UI.Android.hideSoftKeyboard();
      	});
       
      	win.add(textField);
      	win.add(test);
      	win.open();
      

      Expected Result:
      It should hide the keyboard after clicking.

      Work-Around:
      Use the TextField object's blur() method instead. This still hides the keyboard in 8.2.1. However, it will also remove the focus from the TextField which might not be what you want.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                rislam Riduanul Islam
                Reviewer:
                Joshua Quick
                Tester:
                Sohail Saddique
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration