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

Windows: ScrollView sizing incorrectly in a vertical layout

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 7.5.0
    • Fix Version/s: Release 8.0.0
    • Component/s: Windows
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2018 Sprint 25

      Description

      In our unit tests suite, the ti.ui.layout.test.js scrollViewWithSIZE test is failing on Windows with expected 24 to equal 50

      https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/ti.ui.layout.test.js#L1291

      The test is now skipped on Windows.

      It turns out this only happens when parent view is vertical layout.
      As a side note, postlayout for ScrollView may be fired multiple times during layout and we should be testing latest value only.

      var scrollView = Ti.UI.createScrollView({
          height: Ti.UI.SIZE,
          width: Ti.UI.SIZE,
          backgroundColor: 'red'
      });
       
      var view1 = Ti.UI.createButton({
          width: '100',
          height: '50',
          title: 'Click',
          backgroundColor: 'pink'
      });
       
      scrollView.add(view1);
       
      scrollView.addEventListener('postlayout', function () {
          Ti.API.info(JSON.stringify(scrollView.size));
      });
       
      var win = Ti.UI.createWindow({
          backgroundColor: 'white',
          layout: 'vertical'
      });
      win.add(scrollView);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                cwilliams Christopher Williams
                Reviewer:
                Josh Longton
              • Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code