mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 17:41:33 +03:00
virtualscroller: fix iOS bounce
This commit is contained in:
parent
e81920b43b
commit
f669dc48be
@ -303,8 +303,10 @@ export default class VirtualScroller<T> extends Component<VirtualScrollerProps<T
|
||||
const ref = this.childRefs.get(this.savedIndex)!;
|
||||
//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;
|
||||
|
Loading…
Reference in New Issue
Block a user