Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16463] iOS: Search bar disappears in some cases

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2014-08-20T04:31:40.000+0000
Affected Version/sRelease 3.2.1
Fix Version/sRelease 3.4.0
ComponentsiOS
Labelslistview, module_listview, orientation, qe-closed-3.4.0, qe-manualtest, qe-testadded, searchbar
ReporterMartijn Kooij
AssigneeIngo Muschenetz
Created2014-02-13T20:17:42.000+0000
Updated2014-12-16T08:40:13.000+0000

Description

Certain actions make the searchbar disappear. The easiest to reproduce is changing the device orientation when the searchbar is off screen (so when you have scrolled down a bit). Another way, for which I cannot easily create a piece of reproducing code, is if you update the data of a listview by simply assigning the sections again. The attached video shows the searchbar disappearing after rotating the device.
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

// create tab group
var tabGroup = Titanium.UI.createTabGroup();


//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

	var search = Ti.UI.createSearchBar({
		barColor: '#FFFFFF',
		borderColor: 'white'
	});
	search.addEventListener('cancel', function() {
		search.blur();
	});

	var listView = Ti.UI.createListView({
		searchView: search,
		top: 10
	});

	var sections = [];
	
	var fruitSection = Ti.UI.createListSection({ headerTitle: 'Group 1'});
	var fruitDataSet = [
	    {properties: { title: 'Item 1'}},
	    {properties: { title: 'Item 2'}},
	    {properties: { title: 'Item 3'}},
	    {properties: { title: 'Item 4'}},
	    {properties: { title: 'Item 5'}},
	    {properties: { title: 'Item 6'}},
	    {properties: { title: 'Item 7'}},
	    {properties: { title: 'Item 8'}},
	];
	fruitSection.setItems(fruitDataSet);
	sections.push(fruitSection);
	
	var vegSection = Ti.UI.createListSection({ headerTitle: 'Group 2'});
	var vegDataSet = [
	    {properties: { title: 'Test 1'}},
	    {properties: { title: 'Test 2'}},
	    {properties: { title: 'Test 3'}},
	    {properties: { title: 'Test 4'}},
	    {properties: { title: 'Test 5'}},
	    {properties: { title: 'Test 6'}},
	    {properties: { title: 'Test 7'}},
	    {properties: { title: 'Test 8'}},
	];
	vegSection.setItems(vegDataSet);
	sections.push(vegSection);
	
	listView.sections = sections;

	win1.add(listView);

//
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});

var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'I am Window 2',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win2.add(label2);



//
//  add tabs
//
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  


// open tab group
tabGroup.open();

Attachments

FileDateSize
searchbar_disappears.mov2014-02-13T20:17:42.000+00004538371

Comments

  1. Ritu Agrawal 2014-02-14

    Moving this ticket to engineering as I can reproduce this issue with 3.2.1 release. Please see the attached video for reference.
  2. Martijn Kooij 2014-03-08

    Would it be possible to explain the rules you guys use for user interface breaking bugs such as this one? How is this issue classified? Or, in other words... When will it be fixed because I am holding back my big moving from tableviews to listviews update because of this one (and others as well, but this is the most important one as it easily breaks a basic feature). Thanks.
  3. Martijn Kooij 2014-03-24

    Please? Pretty please? Please pretty please with sugar on top?
  4. Shameer Jan 2014-08-13

    Issue cannot reproduces on SDK version 3.4.0 Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.4.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
  5. Ingo Muschenetz 2014-08-13

    [~shameerj] and [~sunila]. We should test this in 3.2.1 and 3.4.0 (latest master). * If it cannot be reproduced in 3.2.1, then mark as Can't Reproduce, with no fix version * If it can be reproduced in 3.2.1 but not in 3.4.0, mark as Fixed in 3.4.0 Reopening.
  6. Ingo Muschenetz 2014-08-14

    I see no justification this should have ben re-resolved. See my comments above, follow those instructions, and then report your updated findings.
  7. Martijn Kooij 2014-08-18

    I can confirm, I can no longer reproduce the original issue using the latest 3.4.0 build (august 15.).
  8. Shameer Jan 2014-08-20

    Issue reproduces on SDK version 3.2.1 Cannot reproduces on SDK version 3.4.0 Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.4.0.GA Titanium SDK version 3.2.1.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
  9. Priya Agarwal 2014-08-20

    Verified with: Appcelerator Studio:3.4.0.201408180158 Sdk:3.4.0.v20140819094113 alloy:1.5.0-dev titanium:3.4.0-dev titanium-code-processor:1.1.1 acs:1.0.16 npm:1.3.2 OS:Maverick(10.9.4) xcode: Xcode6Beta5 Device:iPhone5s(v8.0) Search bar does not disappears on changing orientation. Working as expected. Hence closing the issue
  10. Fokke Zandbergen 2014-12-16

    Still seeing this in 3.4.1.GA

JSON Source