Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: Release 3.4.1, Release 3.5.0
-
Fix Version/s: Release 3.5.0, Release 4.0.0
-
Component/s: iOS
-
Environment:
3.5.0.Beta
3.4.1.GA
-
Story Points:8
-
Sprint:2014 Sprint 25 SDK
Description
A popover that has a SearchBar attached to a ListView will crash if it hides will the SearchBar still has focus.
Same goes for when the ListView is removed from its parent view while the SearchBar has focus, so that seems to be the actual problem.
The crashlog is attached.
Test case #1
1. Install an app with the following code on an iPad (crashes on iOS Simulator as well, but doesn't show crashlog)
2. Tap the button
3. Tap the searchbar to focus
4. Tap outside the popover to hide it
5. App crashes after a second or so
var w = Ti.UI.createWindow({ |
backgroundColor: 'white' |
});
|
|
var b = Ti.UI.createButton({ |
title: 'Click' |
});
|
|
b.addEventListener('click', function() { |
|
var cw = Ti.UI.createWindow({ |
width: 300,
|
height: 300
|
});
|
|
var lv = Ti.UI.createListView({ |
searchView: Ti.UI.createSearchBar()
|
});
|
|
cw.add(lv);
|
|
var p = Ti.UI.iPad.createPopover({ |
width: 300,
|
height: 300,
|
contentView: cw
|
});
|
|
p.show({
|
view: b
|
});
|
|
});
|
|
w.add(b);
|
w.open();
|
Test case #2
1. Install an app with the following code on an iOS device (crashes on iOS Simulator as well, but doesn't show crashlog)
2. Tap the searchbar to focus
3. Tap the button to remove the ListView
4. App crashes after a second or so
var w = Ti.UI.createWindow({ |
backgroundColor: 'white' |
});
|
|
var lv = Ti.UI.createListView({ |
top: 100,
|
searchView: Ti.UI.createSearchBar()
|
});
|
|
var b = Ti.UI.createButton({ |
top: 30,
|
title: 'Click me after focussing on search field' |
});
|
|
b.addEventListener('click', function() { |
w.remove(lv);
|
});
|
|
w.add(b);
|
w.add(lv);
|
|
w.open();
|
Attachments
Issue Links
- relates to
-
TIMOB-18345 iOS: Crash if all results from search in ListView fit on view
-
- Closed
-