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

Android: Not all TextField return key types fire a "return" event

    Details

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

      Ti SDK 7.0.1.GA

    • Story Points:
      13
    • Sprint:
      2018 Sprint 06 SDK, 2018 Sprint 07 SDK

      Description

      Setting returnKeyType on TextField does not fire return event in case of some particular values.

      Here's a sample code to show it with possible values where return event fired up & for some other values which it doesn't get fired for. I am also aware that not all return-types are not for Android but they should not prevent return event to get called.

      var win = Ti.UI.createWindow({ backgroundColor : 'white'});
       
      var tf = Ti.UI.createTextField({
      	top : 40,
      	left : 20,
      	right : 20,
      	returnKeyType : Ti.UI.RETURNKEY_SEARCH,
      	hintText : 'Hit \'Return\' button'
      });
       
      tf.addEventListener('return', function () {
      	alert('it worked');
      });
       
      win.add(tf);
       
      win.open();
       
       
      /* these values properly fire 'return' event
       - RETURNKEY_CONTINUE
       - RETURNKEY_DEFAULT
       - RETURNKEY_DONE
       - RETURNKEY_ROUTE
       - RETURNKEY_JOIN
       - RETURNKEY_NEXT
       
      // these does not
       - RETURNKEY_EMERGENCY_CALL
       - RETURNKEY_GO
       - RETURNKEY_GOOGLE
       - RETURNKEY_SEARCH
       - RETURNKEY_SEND
       - RETURNKEY_YAHOO
       */
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ybanev Yordan Banev
                Reporter:
                prashant_saini Prashant Saini
                Reviewer:
                Joshua Quick
                Tester:
                Lokesh Choudhary
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code