streamich/react-use

useLockBodyScroll doesn't restore scroll position

オープン

#840 opened on 2019/12/16

 (7 件のコメント) (0 件のリアクション) (1 人の担当者)TypeScript (3,273 件のフォーク)batch import
bughelp wanted

Repository metrics

Stars
 (43,979 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド