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

MobileWeb: scrollView - does not handle the contentHeight changing as it should

    Details

      Description

      If you are scrolled to the bottom of a scrollView and then the contentHeight of the scrollView is reduced, you will be shown the bottom where the scrollView was, not the new bottom.

      Steps to repro:

      1. run the code below
      2. scroll to the bottom
      3. click the button
      4. notice that you no longer see the blue content view
      5. touch the scroll view
      6. notice that suddenly you are at the bottom of the blue view

      var win = Ti.UI.createWindow({
      	backgroundColor: 'white'
      });
      win.open();
       
      var scrollView = Ti.UI.createScrollView({
      	top: 60,
      	height: 400,
      	contentHeight: Ti.UI.SIZE
      });
      win.add(scrollView);
       
      var contentView = Ti.UI.createView({
      	height: 1000,
      	backgroundColor: 'blue',
      	borderWidth: 5,
      	borderRadius: 20,
      	borderColor: 'red'
      });
      scrollView.add(contentView);
       
      var button = Ti.UI.createButton({
      	title: 'Click me',
      	width: 100,
      	height: 40,
      	top: 10
      });
      win.add(button);
       
      button.addEventListener('click', function(){
      	contentView.height = 400;
      });
      

        Attachments

          Activity

            People

            • Assignee:
              bhughes Bryan Hughes
              Reporter:
              jalter Jon Alter
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code