Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15445

iOS7: Scrollview contentHeight not adjusting after Keyboard is dismissed

    Details

      Description

      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(); 
      

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              rsharma Rupesh Sharma
              Reviewer:
              Pedro Enrique (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17616
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code