streamich/react-use

useLockBodyScroll doesn't restore scroll position

开放

#840 创建于 2019年12月16日

 (7 条评论) (0 个反应) (1 位负责人)TypeScript (3,273 个派生)batch import
bughelp wanted

仓库指标

星标
 (43,979 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

What is the current behavior?

When useLockBodyScroll is passed a value of false, it does re-enable scrolling, however any previous scroll position is not restored.

What is the expected behavior?

The previous scroll position should be restored to the scrolled element.

A little about versions:

  • OS:
  • Browser (vendor and version):
  • React: 16.11.0
  • react-use: 13.10.1

贡献者指南