streamich/react-use

useLockBodyScroll doesn't restore scroll position

Aperta

#840 aperta il 16 dic 2019

 (7 commenti) (0 reazioni) (1 assegnatario)TypeScript (3273 fork)batch import
bughelp wanted

Metriche repository

Star
 (43.979 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor