virtualscroller: fix iOS bounce

This commit is contained in:
Liam Fitzgerald 2021-02-25 11:57:18 +10:00
parent e81920b43b
commit f669dc48be
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -304,7 +304,9 @@ export default class VirtualScroller<T> extends Component<VirtualScrollerProps<T
//ref.scrollIntoView();
const newScrollTop = this.window.scrollHeight - ref.offsetTop - this.savedDistance;
this.window.style['-webkit-overflow-scrolling'] = 'auto';
this.window.scrollTop = newScrollTop;
this.window.style['-webkit-overflow-scrolling'] = 'touch';
requestAnimationFrame(() => {
this.savedIndex = null;
this.savedDistance = 0;