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
- Create a simple titanium project
- Update app.js to test code
- Run no test environment
- Type few text in search bar, clear button will appears in search Bar
- Click on clear
button
- 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