-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where _increasePoolIfNeeded could loop indefinitely. Fixes #…
…559 Ensure the _physicalTop is never recalculated to be below the current scroll position, and make sure cached scroll positions are used in methods which may be called outside of a scroll event handler for internal consistency.
- Loading branch information
1 parent
5fb80b1
commit 5b5c78b
Showing
4 changed files
with
114 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
bower_components* | ||
bower-*.json | ||
node_modules | ||
*.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!-- | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS | ||
--> | ||
|
||
<link rel="import" href="../../polymer/polymer.html"> | ||
<link rel="import" href="../iron-list.html"> | ||
|
||
<dom-module id="odd-sized-list"> | ||
<template> | ||
<style> | ||
:host { | ||
display: block; | ||
width: 300px; | ||
height: 300px; | ||
border: 1px solid black; | ||
} | ||
iron-list { | ||
height: 100%; | ||
} | ||
.item { | ||
overflow: hidden; | ||
border-bottom: 1px solid gray; | ||
} | ||
</style> | ||
<iron-list id="list" items="{{items}}"> | ||
<template> | ||
<div class="item" style$="height: [[item]]px;">Item [[index]] ([[item]]px)</div> | ||
</template> | ||
</iron-list> | ||
</template> | ||
</dom-module> | ||
|
||
<script> | ||
Polymer({ | ||
is: 'odd-sized-list', | ||
properties: { | ||
items: { | ||
value: function() { | ||
// Some hand-tuned sizes to ensure the physical average | ||
// after scrolling back up is such to trigger the bug | ||
const items = []; | ||
while (items.length < 70) { | ||
items.push(30); | ||
} | ||
while (items.length < 90) { | ||
items.push(90); | ||
} | ||
while (items.length < 5000) { | ||
items.push(30); | ||
} | ||
return items; | ||
} | ||
} | ||
} | ||
}); | ||
</script> |