Page scroll to the bottom of page when closing the modal on Safari
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 439
- Avg merge
- 14h 32m
- Merged PRs (30d)
- 19
Description
## Description
On Safari, when opening the search modal and then closing it without having made any search, the page scroll to the bottom of the page.
When searching something, it looks like the search box behave nicely.
Safari version: 14.1
Docsearch version: 3.0.0-alpha.42
https://user-images.githubusercontent.com/7622246/149235336-3516931f-a4a7-442d-9072-5462aad88362.mov
## Steps to reproduce
1. Open Safari 14.1
2. Go to [https://www.scrapingbee.com/documentation]
2. Type `cmd + K` to open the modal
3. Press `esc` to close it
4. Window scroll to the bottom of the page
**Live reproduction:**
https://www.scrapingbee.com/documentation
## Expected behavior
It should not scroll to the bottom of the page
## Environment
- OS: macOS 11.3.1
- Browser: Safari 14.1
- DocSearch version: 3.0.0-alpha.42
Contributor guide
Research direction
Reproduce the issue at https://www.scrapingbee.com/documentation using Safari 14.1: open the search modal with Cmd+K, close it with Escape, and observe the scroll position. Trace the modal close behavior and determine why closing without a search reaches the bottom; done means the page retains its position after closing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100