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

Android: Textfield:Focus event is getting fired with blur event call on orientation change.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 2.1.0, Release 3.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      Tested with Titanium SDK: 2.1.0.v20120621184154
      Tested with Titanium  Studio: 2.1.0.201206211609
      Device - Android 2.2.2 LG-P970,Android 4.0.2 samsung galaxy nexus,Android 3.2 Samung GALAXY Tab 620
      Machine OS - MAC 10.7.3

      Description

      This is not a regression. It exists as far as 1.8.2

      Steps to reproduce:
      1) Use the code below:

      var win = Ti.UI.createWindow();
      win.backgroundColor='red';
      		var tf = Titanium.UI.createTextField({
      				backgroundColor: "#fff",
      				width : 250,
      				height : 80,
      				focusable : true,
      			});
      win.add(tf);
      			tf.addEventListener('focus', function() {
      				alert('Focus fired');
      			});
      		Ti.Gesture.addEventListener("orientationchange", function() {
      			tf.blur();
      			alert('blur fired');
      		}); 
      win.open();	
      

      2) Run the app
      3) Click 'ok' on the focus alert and rotate device to a new orientation.

      Expected result:
      2) After step 2,app should be running and an alert 'Focus fired' should be displayed.
      3) Alert 'Blur fired' should be displayed.

      Actual result:
      2) After step 2,app is running and an alert 'Focus fired'is displayed.
      3) 2 alerts 'Blur fired' and 'Focus fired' are displayed.

      Focus event should not get fired.It is not called in orientationchange eventlistener.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sbhadauria Shyam Bhadauria
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

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

                  Git Source Code