Skip to content

Commit

Permalink
Fix potential scrollbar issue in grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Moore committed Mar 29, 2016
1 parent 371c28d commit c5f9e81
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/mm-item-recycler/mm-item-recycler.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</mm-template-finder>

<div id="pane">
<div id="quad"></div>
<div id="constrainer">
<div id="middle"></div>
<div id="header">
Expand Down
4 changes: 2 additions & 2 deletions src/mm-item-recycler/mm-item-recycler.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ found here: https://github.com/Polymer/core-list

_paneResponse: function (e) {
var itemRecycler = this;
var delta = +(elementHeight(itemRecycler.$.pane) - itemRecycler._viewportHeight) || 0;
var delta = +(elementHeight(itemRecycler.$.quad) - itemRecycler._viewportHeight) || 0;

delta -= (this._headerHeight + this._footerHeight);

Expand Down Expand Up @@ -558,7 +558,7 @@ found here: https://github.com/Polymer/core-list
},

_initializeViewport: function() {
var viewportHeight = elementHeight(this.$.pane);
var viewportHeight = elementHeight(this.$.quad);

this._headerHeight = elementHeight(this.$.header);
this._footerHeight = elementHeight(this.$.footer);
Expand Down
10 changes: 10 additions & 0 deletions src/mm-item-recycler/mm-item-recycler.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
max-height: inherit;
}

#quad {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
display: block;
overflow: hidden;
}

#constrainer {
display: inline-block;
}
Expand Down

0 comments on commit c5f9e81

Please sign in to comment.