{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-list/issues/12","labels_url":"https://api.github.com/repos/PolymerElements/iron-list/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-list/issues/12/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-list/issues/12/events","html_url":"https://github.com/PolymerElements/iron-list/issues/12","id":93870037,"number":12,"title":"changing items (hence list size) when fully scrolled causes problems","user":{"login":"m4b","id":1920204,"avatar_url":"https://avatars.githubusercontent.com/u/1920204?v=3","gravatar_id":"","url":"https://api.github.com/users/m4b","html_url":"https://github.com/m4b","followers_url":"https://api.github.com/users/m4b/followers","following_url":"https://api.github.com/users/m4b/following{/other_user}","gists_url":"https://api.github.com/users/m4b/gists{/gist_id}","starred_url":"https://api.github.com/users/m4b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4b/subscriptions","organizations_url":"https://api.github.com/users/m4b/orgs","repos_url":"https://api.github.com/users/m4b/repos","events_url":"https://api.github.com/users/m4b/events{/privacy}","received_events_url":"https://api.github.com/users/m4b/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-08T19:27:06Z","updated_at":"2015-07-09T19:57:48Z","closed_at":null,"body":"Very briefly, I've noticed that:\r\n\r\n1. If the user scrolls all the way down on a list,\r\n2. Then effects a new dataset/array change, which has a smaller amount of elements (and hence less height w.r.t the scroller)\r\n3. Then the list behaves \"unusually\"; in Chrome the scroller doesn't appear to move when the user clicks on it and they have to \"scroll\" all the way to the top for the list to show items again.\r\n\r\nI can mock up a simple example if the above isn't sufficient"},"comment":{"url":"https://api.github.com/repos/PolymerElements/iron-list/issues/comments/120127757","html_url":"https://github.com/PolymerElements/iron-list/issues/12#issuecomment-120127757","issue_url":"https://api.github.com/repos/PolymerElements/iron-list/issues/12","id":120127757,"user":{"login":"m4b","id":1920204,"avatar_url":"https://avatars.githubusercontent.com/u/1920204?v=3","gravatar_id":"","url":"https://api.github.com/users/m4b","html_url":"https://github.com/m4b","followers_url":"https://api.github.com/users/m4b/followers","following_url":"https://api.github.com/users/m4b/following{/other_user}","gists_url":"https://api.github.com/users/m4b/gists{/gist_id}","starred_url":"https://api.github.com/users/m4b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m4b/subscriptions","organizations_url":"https://api.github.com/users/m4b/orgs","repos_url":"https://api.github.com/users/m4b/repos","events_url":"https://api.github.com/users/m4b/events{/privacy}","received_events_url":"https://api.github.com/users/m4b/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T19:57:48Z","updated_at":"2015-07-09T19:57:48Z","body":"@blasten: here is a simpler example, which breaks the scroller on chrome when you change the items when scrolled all the way to the bottom.  In some cases (in a simple psk project structure, for example), the items all appear on the same line initially on chrome.\r\n \r\nOn firefox the scroller doesn't break when changing elements when scrolled all the way to the bottom, but after scrolling past the first page of elements, the items no longer appear.\r\n\r\nOn safari the breakage is similar to chrome.\r\n\r\nJSBIN: http://jsbin.com/fiheji/edit?html,console,output\r\n\r\nModule:\r\n````html\r\n<dom-module id=\"list-fit\">\r\n  <style>\r\n  @apply(--layout-fit);\r\n  paper-material {\r\n    margin: 16px;\r\n  }\r\n  </style>\r\n  <template>\r\n      <paper-material elevation=\"4\" class=\"fit\">\r\n        <paper-header-panel mode=\"standard\">\r\n          <paper-toolbar>\r\n            <paper-button raised on-tap=\"changeItems\">Change Items</paper-button>\r\n            <div>Iron list inside fit</div>\r\n          </paper-toolbar>\r\n            <iron-list items=\"[[_items]]\">\r\n              <template>\r\n                <paper-item>[[item]]</paper-item>\r\n              </template>\r\n            </iron-list>\r\n        </paper-header-panel>\r\n      </paper-material>\r\n  </template>\r\n  <script>\r\n  Polymer({\r\n    is: 'list-fit',\r\n    properties: {\r\n      _current: {\r\n        value: 0\r\n      },\r\n      _items: {\r\n        type: Array,\r\n        notify: true,\r\n        value: function() {\r\n          var i = 500;\r\n          var res = [];\r\n          while (i--){\r\n            res.push(i);\r\n          }\r\n          return res;\r\n        }\r\n      }\r\n    },\r\n    changeItems: function(){\r\n      this._current = (this._current +1) % 2;\r\n      var i = 500;\r\n      if (this._current % 2 === 0){\r\n        i = 500;\r\n      }else{\r\n        i = 100;\r\n      }\r\n      var tmp = [];\r\n      while (i--){\r\n         tmp.push(i);\r\n      }\r\n      this._items = tmp;\r\n      console.log('item count: ', this._items.length);\r\n    }\r\n  });\r\n</script>\r\n</dom-module>\r\n````\r\n\r\nI've also noticed that embedding `<iron-list>` inside nested `<header-panel>` with `class=\"fit\"` on a parent element also cause similar breakage, with elements not showing up, etc.\r\n\r\nThis seems like fairly common behavior to have the main UI element fit, especially when nested in other elements, but please correct me if I'm wrong here, what's recommended instead if so, etc."}}