Skip to content

Commit

Permalink
Workaround for the disappearing header issue on old iOS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed Sep 22, 2020
1 parent 76c7949 commit 7be96aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vaadin-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,17 @@
this.$.items.style.paddingBottom = `${this.$.footer.offsetHeight}px`;
}
}

if (this._ios) {
const isOldIOS = !window.CSS.supports('position', 'sticky');
if (isOldIOS) {
// Due to a rendering bug, the sticky header may disappear on an older iOS (10-12) Safari
// if the grid is used inside of a flex box. This is a workaround for the issue.
this.$.table.style.height = `${this.$.scroller.offsetHeight}px`;
this.$.table.style.minHeight = '100%';
this.$.table.style.maxHeight = '100%';
}
}
}

/**
Expand Down

0 comments on commit 7be96aa

Please # to comment.