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

iOS: 'change' event called twice when 'Clear' button tapped on Search Bar

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.2.0
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      IOS 7.0, Ti CLI 3.2.0-cr3, Ti SDK 3.1.3.GA, 3.2.0
      Ti CLI 3.2.1, Ti SDK 3.2.1.GA

      Description

      Problem Description

      CHANGE event called twice when Clear button tapped on Search Bar.

      Test Environment

      OS: MAC OS X 10.8.5
      Ti SDK: 3.1.3 GA, 3.2.0.x
      Ti CLI: 3.2.0-cr3
      IOS simulator 7.0

      Test Code

      var mainWindow = Ti.UI.createWindow();
       
      var mainView = Ti.UI.createView();
      var searchBar = Ti.UI.createSearchBar();
      var table = Ti.UI.createTableView({
      	search : searchBar
      });
       
       
      searchBar.addEventListener('change', function(_event) {
      	 
      	console.log('Text : ' + searchBar.value + ', Parameters : ' + JSON.stringify(_event));
      	 
      	value = searchBar.value;
      });
       
      mainView.add(table);
      mainWindow.add(mainView);
      mainWindow.open();
      
      

      Step to reproduces
      1. Create a simple titanium project
      2. Update app.js to test code
      3. Run no test environment
      4. Type few text in search bar, clear button will appears in search Bar
      5. Click on clear button
      6. Check console log change event will call twice
      Expected Result

      Change event will call twice in clear button tap

      Actual Result

      It should be call once

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              mrahman Mostafizur Rahman
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration