Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix right drawer layouts display over content (#11651)
**Motivation** Using the example project if you set the `drawerPosition="right"` and `drawerType="front"` (the default for the example) the drawer is positioned in the middle of the screen. Other combinations of these settings are also affected including at least `drawerType="slide"` with `drawerPosition="right"`. It seems to be platform independent. I'm able to reproduce on web, iOS, and Android. Below is a screenshot from web on mobile in landscape. Image of the issue: ![image](https://github.com/react-navigation/react-navigation/assets/40714964/c33e3747-5e09-4f9e-9052-4f14c0bbb3ac) When using the RTL setting in the example app it became clear that It needs the same logic for `isRTL` that the Drawer Navigator has. I took the logic from the Drawer Navigator related to `I18nManager` from `react-native` and leveraged it in the react-native-drawer-layout. It appears these two extremely similar. Perhaps it's worth leveraging the react-native-drawer-layout package for drawer navigation and maintaining it in one place but that's beyond the scope of this pr/issue. **Test plan** To test using the example, set `drawerPosition="right"` and `drawerType="front"` (example currently had front already set) for a Drawer from react-native-drawer-layout. The layout will should be off screen on the right. Not in the middle hovering above the content. Image of resolved issue (with drawer open). ![image](https://github.com/react-navigation/react-navigation/assets/40714964/bb1f0996-8f7d-4796-9350-2917c6a01e8d) --------- Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
- Loading branch information