[TIMOB-2881] Android: Galaxy Tab scrollTo Prevents Text Field from Updating
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | Android |
Labels | android, defect, reported-1.5.1, reported-1.6.0, rplist |
Reporter | Dawson Toth |
Assignee | Don Thorp |
Created | 2011-04-15T03:31:54.000+0000 |
Updated | 2011-04-17T02:00:20.000+0000 |
Description
Problem
If you have a scroll view with a text field inside of it, and you call scrollTo on that scroll view, typing in the text field won't update what you see. At that point, if you move the scroll view by dragging your finger on it, the text field will update and show you what you typed.
Tested On
Tested with Titanium Mobile SDK 1.5.1, 1.6.0 (Jan 18, 2011)
BROKEN on Android Simulator GALAXY TAB Addon 2.2
BROKEN on Android GALAXY TAB device
WORKS on Android Simulator 2.2
Sample Code
Add this to an app.js to reproduce this. Follow the onscreen
labels created by it, and the problem should be pretty
clear.
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var scrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:800,
top:0,
showVerticalScrollIndicator:false,
showHorizontalScrollIndicator:true
}); scrollView.add(Titanium.UI.createTextField({
color:'#336699',
height:45,
width:215,
top:500,
left:20
})); scrollView.add(Ti.UI.createLabel({
text: 'Welcome to the galaxy tab messed up text field demo. Please touch anywhere to begin.',
top: 10, left: 10, right: 10, height: 100
})); scrollView.add(Ti.UI.createLabel({
text: 'Now without scrolling, try typing something in the above text box.',
top: 600, left: 10, right: 10, height: 50
}));
win.add(scrollView); win.addEventListener('click', function(e) {
scrollView.scrollTo(0, 700);
}); win.open();
Trace Log
No relevant information is shown in a trace level log. All that
is shown is that we've tapped on the scroll view (to fire the
"scrollTo" event), and then that we tapped on the text field (to
type):
[TRACE] E/TiUIView( 321): (main) [5722,11848] TAP, TAP, TAP on [Ti.UI.ScrollView]
[TRACE] E/TiUIView( 321): (main) [1401,13249] TAP, TAP, TAP on [Ti.UI.TextField]
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/64991">http://developer.appcelerator.com/helpdesk/view/64991
Using galaxy tab 2.2.2 running [INFO] Titanium SDK version: 1.6.0 (02/08/11 20:55 bd9d124...) I am unable to reproduce the noted behavior using the provided content. I am able to immediately enter and see the text.
opening a new ticket about the click event being fired in landscape with no user interaction