GeekyAnts / GeekyAnts/NativeBase

Modal not centered vertically when using ScrollView on web

Open
#5,668 3 comments 1 reaction 0 assignees View on GitHub
bug triage v3
Dominant language
TypeScript
Stars
20.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

### Description

The modal content gets pushed off screen if there is a ScrollView on the page.

### CodeSandbox/Snack link

https://codesandbox.io/s/brave-sound-8yxn0g?file=/src/components/Example.tsx

### Steps to reproduce

1. Create a page that has a `ScrollView` with enough children in it that it will scroll off page
2. Use a modal component

Notice how the Modal content is centered across the whole page (which means it usually gets hidden). Appears to only happen on web.

Expected behaviour: the modal takes up the viewport height, not the page height.

### NativeBase Version

3.3.7

### Platform

- [ ] Android
- [ ] CRA
- [ ] Expo
- [ ] iOS
- [X] Next

### Other Platform

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.