themesberg / themesberg/flowbite
Modal always opens at the top on mobile browsers and page remains at the top after closing
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 9.4k
- Forks
- 862
- PR merge metrics
- No merged PRs in 30d
Description
Bug Description
When opening a modal on mobile browsers, the page always scrolls to the top. After closing the modal, the page remains at the top instead of returning to the previous scroll position.
Steps to Reproduce
- Open a Flowbite demo page on a mobile browser.
- Scroll down and open a modal.
- Observe that the page scrolls to the top as soon as the modal is opened.
- Close the modal.
- Observe that the page remains at the top and does not return to the previous scroll position.
Expected Behavior
When opening a modal, the page should remain at the current scroll position. After closing the modal, the page should return to its previous scroll position.
Actual Behavior
The page scrolls to the top when the modal is opened. After closing the modal, the page stays at the top and does not return to the previous position.
Environment
- Browser: Safari, Chrome, Firefox on mobile devices
- Operating System: iOS, Android
Additional Information
This issue significantly impacts user experience as users lose their place on the page after closing the modal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue on a Flowbite demo page using a mobile Safari, Chrome, or Firefox browser, then locate the modal behavior responsible for page scrolling. Done means opening a modal preserves the current scroll position and closing it restores that position on iOS and Android.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100