[TIMOB-24322] Android: SearchView: “change” event is fired on SearchView first initialization.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-02-06T21:39:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | android, change, community, notable, searchview |
Reporter | grazianogrespan |
Assignee | Frankie Merzadyan |
Created | 2017-01-17T23:04:28.000+0000 |
Updated | 2017-02-06T21:39:34.000+0000 |
Description
Basically, is the same issue of TIMOB-13721 .
PR: https://github.com/appcelerator/titanium_mobile/pull/8760
Step to reproduce :
1. Create Android SearchView and set value property on initialization.
2. Add “change” event listener to the SearchView.
3. Wait for the alert to appear.
The change event should not fire automatically when the searchView is initialized with a text value.
////// Begin Test Case ///////
var win = Ti.UI.createWindow();
var searchView = Ti.UI.Android.createSearchView({
value:"", // it may be any value...
iconified: false
});
searchView.addEventListener("change",function(){
alert("Fired Change Event!");
});
win.add(searchView);
win.open();
////// End Test Case ///////
Hey [~grazianogrespan], so it's the same as in TIMOB-13721, but with
Ti.UI.SearchView
instead ofTi.UI.TextField
? Interesting!Yes @Hans Knoechel , exactly the same... I did not tried this issue with previous SDKs but with the actual 6.0.1.GA this "bug" exists.
Yeah, looks very valid! Moved the ticket to TIMOB already. We'll try to get it into the next patch version!
Verified the fix is present in SDK 6.1.0.v20170206114448. Closing.