Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10602] Android: When there are Multiple Search Bars Return key goes to the next SearchBar instead of populating results of the current Search Bar.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-08-13T21:23:07.000+0000
Affected Version/sRelease 2.1.0, Release 2.1.1, Release 3.1.0
Fix Version/s2013 Sprint 12 API, 2013 Sprint 12, Release 3.2.0
ComponentsAndroid
Labelsapi, exalture, module_searchbar, parity, qe-manualtest
ReporterAmuktha Akkinepally
AssigneeSunila
Created2012-08-24T16:50:14.000+0000
Updated2014-08-13T21:23:07.000+0000

Description

When there are more than one search bars in a window and when we type something in the first search bar and return key is pressed, the next search bar is getting focused instead of populating the results for the first search bar. When the last search bar has some value entered and when return key is pressed it stays on that search bar which is the exact behavior that is expected for the first Search Bar. It works fine on iOS.

Steps to Reproduce:

1. Run the application with the below sample app.js. 2. Type something in the first Search bar and then press the return key on the keyboard. Expected Result: The control should stay in the first search bar. Actual Result: It goes to the second search bar Automatically on pressing the return key.
var win = Titanium.UI.createWindow({  
    title:'Search Bars',
    backgroundColor:'#fff'
});
var search1 = Titanium.UI.createSearchBar({
    barColor:'#000',
    showCancel:true,
    height:43,
    top:0
});


var search2 = Titanium.UI.createSearchBar({
    barColor:'#000',
    showCancel:true,
    height:43,
    top:80
});
win.add(search1);
win.add(search2);
win.open();

Comments

  1. jithinpv 2013-03-05

    Issue reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2 iOS iPhone Simulator: iOS SDK version: 6.0 works fine on iOS.
  2. Sunila 2013-04-08

    set ime options to IME_ACTION_DONE instead of default IME_ACTION_NEXT. Setting to IME_ACTION_DONE will also fire the 'return' event. https://github.com/appcelerator/titanium_mobile/pull/4117
  3. Paras Mishra 2013-10-23

    Pressing the return key on any searchBar, it stays on the current searchBar. Verified fix on: Device : HTC desire V , Android version : 4.0.3 SDK: 3.2.0.v20131022171645 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310181700 XCode : 5

JSON Source