Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19539] iOS: ScrollView scrolls to the top when typing text to TextArea

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionCannot Reproduce
Resolution Date2019-12-06T22:42:20.000+0000
Affected Version/sRelease 4.1.1, Release 6.1.0, Release 6.1.1
Fix Version/sn/a
ComponentsiOS
LabelsTCSupportTriage, scrollview, textarea
ReporterMatej
AssigneeVijay Singh
Created2014-10-01T16:11:19.000+0000
Updated2019-12-06T22:42:20.000+0000

Description

ScrollView scrolls to the top when typing some text to a TextArea. To be more specific when some key is pressed TextArea will show the last added letter and then it will scroll to the top. See end of the attached video when I am trying to type a word... It keeps going up and down. Also TextArea shouldn't be under a keyboard.
var win = Ti.UI.createWindow({
    backgroundColor: "black"
});
 
var scrollView = Ti.UI.createScrollView({
    width: Ti.UI.FILL, height: Ti.UI.FILL,
    contentWidth: Ti.UI.SIZE, contentHeight: Ti.UI.SIZE
});

var textArea = Ti.UI.createTextArea({
    width: Ti.UI.FILL, height: Ti.UI.SIZE,
    suppressReturn : false,
    scrollable: false,
    borderWidth: 1,
    borderColor: "red",kjh
    top: 0
});

scrollView.add(textArea);
 
win.add(scrollView);
win.open();

Attachments

FileDateSize
ScrollViewScrollsUp.mov2014-10-01T16:11:19.000+00003951448

Comments

  1. Motiur Rahman 2017-06-30

    Hello! I can reproduce this issue with the following sample code and environment. The textArea goes to the top when the text is long enough (when the text goes beyond the screen) you can see it if you keep typing for a bit.

    TESTING ENVIRONMENT:

    Ti SDK 6.1.0.GA and 6.1.1.GA Appcelerator Command-Line Interface, version 6.2.2 iOS device: iPhone 5s(10.3.2)

    TEST CODE:

       var window = Ti.UI.createWindow({
       
       backgroundColor : "#ffffff",
       
       statusBarStyle : Ti.UI.iOS.StatusBar.LIGHT_CONTENT,
       
       touchEnabled : true
       
       });
       
       var scrollView = Ti.UI.createScrollView({
       
       width : Ti.UI.FILL,
       
       height : Ti.UI.FILL,
       
       contentWidth : Ti.UI.SIZE,
       
       contentHeight : Ti.UI.SIZE
       
       });
       
       var overlayTaskScreenTextArea = Ti.UI.createTextArea({
       
       width : 200,
       
       height : Ti.UI.SIZE,
       
       scrollable : false,
       
       top : 200,
       
       left : 58,
       
       color : "#9fa8b0",
       
       value : "TITLE",
       
       textAlign : 'left',
       
       verticalAlign : Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP,
       
       returnKeyType : Ti.UI.RETURNKEY_DONE,
       
       autocapitalization : Ti.UI.TEXT_AUTOCAPITALIZATION_ALL,
       
       autocorrect : false,
       
       scrollsToTop : false,
       
       font : {
       
       fontFamily : "CenturyGothic",
       
       fontSize : "13dp"
       
       },
       
       });
       
       scrollView.add(overlayTaskScreenTextArea);
       
       window.add(scrollView);
       
       window.open();
       

    STEPS TO Reproduce:

    Create a simple project. Update app.js with the test code Run on iOS device. If you type long enough it begins to hide behind the keyboard and when you continue to type it goes up to the top after each letter. Thanks
  2. Alan Hutton 2019-12-06

    Unable to reproducible, with any of the code provided.. Axway Appcelerator Studio, build: 5.1.4.201909061933  macOS : 10.15 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.2 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.3.0.GA iPhone 11 13.2.2

JSON Source