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

貢獻者指南