Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Won't Fix
-
Affects Version/s: Release 3.2.2
-
Fix Version/s: None
-
Component/s: iOS
-
Labels:
-
Environment:
Ti SDK 3.2.2.GA
Ti CLI 3.2.1
Alloy 1.3.1
iOS SDK 7.0.3
iOS 7.0.3
Description
Symptom:
You have a ScrollView with a SearchBar inside. When a SearchBar is the first text input that is focused, the keyboard will cover up the ScrollView, and not scroll any differently than if the keyboard was not displayed.
Expected:
The ScrollView should resize itself to the available space on the screen, allowing for scrolling if necessary.
Workaround:
None that are acceptable. You can put whitespace at the end of your ScrollView content, but that's a poor user experience.
index.xml |
<Alloy> |
<Window backgroundColor="#fff"> |
<ScrollView top="0" bottom="0" left="0" right="0" layout="vertical"> |
<Label id="justAddingSpace" text="Click here to hide keyboard" height="400" width="200" bottom="10" color="#fff" backgroundColor="#C00" onClick="doBlur"/> |
<TextField id="myTextField" width="250" border="1" borderColor="#000"></TextField> |
<SearchBar id="mySearchBar" top="10" bottom="10" height="50"></SearchBar> |
<Button id="btn" title="Button At The End" bottom="20" onClick="doBlur"/> |
</ScrollView> |
</Window> |
</Alloy> |
index.js |
var doBlur = function() { |
$.myTextField.blur();
|
$.mySearchBar.blur();
|
};
|
|
$.index.open();
|