GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-22T22:40:45.000+0000 |
Affected Version/s | Release 3.1.2, Release 3.1.3 |
Fix Version/s | 2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0 |
Components | iOS |
Labels | module_scrollView, qe-closed-3.2.0, qe-testadded, supportTeam |
Reporter | Rupesh Sharma |
Assignee | Vishal Duggal |
Created | 2013-10-10T12:02:56.000+0000 |
Updated | 2014-02-11T09:19:30.000+0000 |
Description
I have a scrollview which doesn't take the full height of the screen, so it doesn't move at all when I try to scroll it. It has a text field inside, though, and when I put focus in that text field, then blur it after, I find that the scrollview is now scrolling even though it shouldn't be anymore now that the keyboard is gone.
Steps:
(1) Observe you can't scroll the screen
(2) Click into the text field
(3) Click out of the text field (or lose focus some other way)
(4) Observe that the screen is now still scrollable even though it shouldn't be.
Note : If keyboardToolbar property is removed then its not reproducible.
Test Code
var win = Ti.UI.createWindow({
backgroundColor : 'white',
exitOnClose : true,
fullscreen : false,
title : 'ScrollView Demo'
});
var scrollView = Ti.UI.createScrollView({
contentWidth : 'auto',
contentHeight : 'auto',
showVerticalScrollIndicator : true,
showHorizontalScrollIndicator : true,
height : Ti.UI.FILL,
width : Ti.UI.FILL
});
var fillView = Ti.UI.createView({
width : Ti.UI.FILL,
height : Ti.UI.FILL,
backgroundColor: 'yellow'
});
var view = Ti.UI.createView({
backgroundColor : '#336699',
borderRadius : 10,
height : 200,
width : 200,
top : 300
});
var btn = Ti.UI.createButton({
title : 'test'
});
var toolbar = Ti.UI.iOS.createToolbar({
items: [btn]
});
var textField = Ti.UI.createTextField({
borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
color : '#336699',
width : 150,
height : 60,
keyboardToolbar : toolbar
});
scrollView.add(fillView);
fillView.add(view);
win.add(scrollView);
view.add(textField);
win.open();
Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4823
Tested and verified the fix with: Mavericks 10.9 Appcelerator Studio, build: 3.2.0.201310230601 Titanium SDK, build: 3.2.0.v20131023120113 CLI 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f) iPhone5 iOS 7.0.2 iPad mini 7.0.2 iPad mini 6.1.3