streamich/react-use

useLockBodyScroll doesn't restore scroll position

Open

#840 aberto em 16 de dez. de 2019

Ver no GitHub
 (7 comments) (0 reactions) (1 assignee)TypeScript (3.273 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (43.979 stars)
Métricas de merge de PR
 (Mesclagem média 1743d 9h) (1 fundiu PR em 30d)

Description

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

Guia do colaborador