react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

Bottom sheet opens on rotation

Open Mookiies opened this issue 4 years ago • 32 comments

Bug

The bottom sheet opens when it should be closed after rotation. Additionally, if the device is rotated with sheet open, the onChange is not called until the device is rotated back again. What is odd is this appears to only happen when snap points are [0%, 100%] (or very close to those numbers).

Environment info

Library Version
@gorhom/bottom-sheet 2.3.0
react-native 0.63.2
react-native-reanimated 1.13.3
react-native-gesture-handler 1.10.3

Steps To Reproduce

  1. Open sheet
  2. Rotate device
  3. Close sheet
  4. Rotate device

Describe what you expected to happen:

  1. Sheet expected to remain closed
  2. Callback onChange to have been called when sheet was closed
  3. Callback onChange to not be called with incorrect snapPoint after rotation.

Video of issue: const snapPoints = useMemo(() => ["0%", '100%'], []);

https://user-images.githubusercontent.com/22333355/124296997-9599ee00-db28-11eb-898a-3a85736a42cb.mov

Video where only change is not using maxed snapPoints showing expected behavior. const snapPoints = useMemo(() => ["20%", '100%'], []);

https://user-images.githubusercontent.com/22333355/124297138-bf531500-db28-11eb-80cd-0145172a8b49.mov

Reproducible sample code

Snack: https://snack.expo.io/@mookiies/github.com-mookiies-bottom-sheet-snap-point-demo (have to run on your device) Repo: https://github.com/Mookiies/bottom-sheet-snap-point-demo

Mookiies avatar Jul 02 '21 15:07 Mookiies

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 02 '21 09:08 github-actions[bot]

bump

Mookiies avatar Aug 02 '21 16:08 Mookiies

+1

sators avatar Aug 04 '21 14:08 sators

+1

GitBond avatar Aug 04 '21 19:08 GitBond

i will look into this 👍

gorhom avatar Aug 05 '21 08:08 gorhom

I am still facing this issue on v4. Any solutions?

harsh-siriah avatar Sep 01 '21 07:09 harsh-siriah

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 01 '21 09:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 07 '21 09:10 github-actions[bot]

bump

sators avatar Oct 07 '21 14:10 sators

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 09 '21 09:11 github-actions[bot]

This issue is active.

pronevich avatar Nov 09 '21 10:11 pronevich

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 10 '21 09:12 github-actions[bot]

bump

sators avatar Dec 10 '21 12:12 sators

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 10 '22 09:01 github-actions[bot]

bump

pronevich avatar Jan 10 '22 10:01 pronevich

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Feb 11 '22 09:02 github-actions[bot]

bump

pronevich avatar Feb 11 '22 09:02 pronevich

This issue still persists.

elmcapp avatar Mar 10 '22 06:03 elmcapp

Are there any temporary patches for this until this issue is fix

elmcapp avatar Mar 15 '22 01:03 elmcapp

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 14 '22 09:04 github-actions[bot]

Bump

sators avatar Apr 14 '22 14:04 sators

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 15 '22 09:05 github-actions[bot]

bump

GitBond avatar May 16 '22 15:05 GitBond

This issue still exists .

goxr3plus avatar May 17 '22 01:05 goxr3plus

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 16 '22 09:06 github-actions[bot]

bump

GitBond avatar Jun 16 '22 16:06 GitBond

The issue still active

Armisael2k avatar Jul 10 '22 05:07 Armisael2k

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 09 '22 09:08 github-actions[bot]

bump

GitBond avatar Aug 09 '22 15:08 GitBond

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Sep 09 '22 09:09 github-actions[bot]