Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3101] Cancel button on Search-bar goes disabled if we it blurs.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2012-08-23T10:16:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsiphone
ReporterSuresh Sharma
AssigneeShak Hossain
Created2012-08-07T22:50:07.000+0000
Updated2016-03-08T07:48:09.000+0000

Description

I am using search bar functionality with alphabetically scroll into a list. It is quit complex to implement But both of the code are separately managed & working very perfectly. -What is the Bug? As i start the search by entering text into search field it filters the list accordingly & keyboard being opened. When i scrolls the list, the keyboard is getting disappeared as i wrote blur() on scroll event of tableview. in this case the cancel button goes disabled & user is not able to cancel the search.This is the bug. As i think what it happens, As soon as it gets unfocused the search bar, the cancel button goes disabled.Which is a bug.It doesn't happened in case of native iphone development. (eg. contact list of iphone works perfectly). Please resolve this bug. I am getting late for delivery of my project. looking for your reply.

Comments

  1. Nikhil Sharma 2012-08-12

    Hi, Please download the latest SDK and try to run with it. It might have fixed in it. You can download it from http://builds.appcelerator.com.s3.amazonaws.com/index.html Please provide a reproducible sample test case as well.
  2. Mostafizur Rahman 2013-12-09

    Hello, We tested this issue but e can’t reproduce it. We used the sample code below with Ti SDK 3.1.3GA. Can you please test this issue using the latest release and let us know your feedback. If we don't hear back from you, we will consider this fixed and the ticket can be closed. Regards,

    Testing Environment:

    Ti CLI 3.3.0 Titanium SDK: 3.1.3 and later IOS -Simulator -iPhone Retina 3.5 inch/iOS 7.0.3 h5. Test Case
        var win1 = Titanium.UI.createWindow({
       	title : 'Tab 1',
       	backgroundColor : '#fff'
       });
       
       var search = Ti.UI.createSearchBar({
       	showCancel : true
       });
       
       var aTableView = Ti.UI.createTableView({
       	search : search
       });
       
       var data = [];
       
       for (var i = 0, j = 100; i < j; i++) {
       	data.push({
       		title : 'Row ' + i
       	});
       };
       aTableView.setData(data);
       
       aTableView.addEventListener('scroll', function() {
       
       	search.blur();
       
       });
       
       aTableView.addEventListener('click', function(e) {
       	if (Ti.Platform.name === 'android') {
       
       		search.value = "";
       		search.hide();
       		search.show();
       	}
       });
       
       win1.add(aTableView);
       win1.open();
       
       
      Thanks
  3. Shak Hossain 2013-12-29

    Closing since no response from Suresh in a while.

JSON Source