streamich/react-use

useLockBodyScroll doesn't restore scroll position

Open

#840 geöffnet am 16. Dez. 2019

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (1 zugewiesene Person)TypeScript (3.273 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (43.979 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1743T 9h) (1 gemergte PR in 30 T)

Beschreibung

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

Contributor Guide