-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FullWindowOverlay - UI is not touchable when over iOS file-viewer's QuickLook #1666
Comments
I made some more investigations. I applied this patch on the react-native-file-viewer extension : https://github.com/vinzscam/react-native-file-viewer/pull/111/files which convert the file-viewer into a modal (vs fullScreen). When doing so, the interaction with the overlay is working correctly. If I put fullScreen back, then the interaction doesn't work anymore.
So it seems related to having a fullscreen ViewController behind the Overlay. |
Now that the Lock screen is wrapped inside a FullWindowOverlay we ensure it is displayed on top of every other elements However, as the react-native-file-viewer instantiate a QuickLook controller using fullScreen, we encounter a bug that prevent any interaction with the Lock screen even if it is visible By forcing the QuickLook controller to be displayed as a modal, the interaction bug does not happens anymore This is an acceptable solution as the modal view fits the iOS UI trends which users are used to An issue has been created on react-native-screen project in order to understand why this bug happens when using a fullScreen controller Related issue: software-mansion/react-native-screens#1666
Now that the Lock screen is wrapped inside a FullWindowOverlay we ensure it is displayed on top of every other elements However, as the react-native-file-viewer instantiate a QuickLook controller using fullScreen, we encounter a bug that prevent any interaction with the Lock screen even if it is visible By forcing the QuickLook controller to be displayed as a modal, the interaction bug does not happens anymore This is an acceptable solution as the modal view fits the iOS UI trends which users are used to An issue has been created on react-native-screen project in order to understand why this bug happens when using a fullScreen controller Related issue: software-mansion/react-native-screens#1666
I just stumbled upon the exact same problem, when I try to render a FullWindowOverlay on top of a fullScreenModal, the overlay renders correctly, but nothing inside it is interactable. @Ldoppea did you find a solution for this? |
I found a solution for this. If anyone stumbles upon this issue in the future, try using touchables from react-native-gesture-handler instead of react-native, they seem to handle gestures better and all the buttons should work, regardless of what's behind the FullWindowOverlay! |
Same here |
I think this will work as a temporary solution. <Portal>
<FullWindowOverlay>
<GestureHandlerRootView style={{ flex: 1 }}>
{props.children}
</GestureHandlerRootView>
</FullWindowOverlay>
</Portal> Specifically my problem was with the react-navigation presentation modal |
just came across a somewhat similar issue, not sure if that's relevant to the original issue though, but just wanted to share an alternative solution without I was trying to use After some time spent on research, I realized that in the original example of react-native-screens/apps/src/tests/Test1096.tsx Lines 37 to 39 in 61ef186
And then in its turn there's a button inside it, which obviously works. So I've added such wrapper and it fixed my issue. Hopefully this helps someone. |
Description
Hi,
My project is using both react-native-screens and react-native-file-viewer
I need to be able to display an Overlay on top of the QuickLook View opened by react-native-file-viewer. So i'm using
<FullWindowOverlay>
.When doing so, my Overlay is correctly displayed on top of the QuickLook View. But some UI components does not react to touch inputs anymore:
<TextInput />
correctly works<Button />
is not touchable anymoreI created a reproduction repository. Here is what is displayed:
✅ The input text can be used. You can enter
a
in the keyboard to hide the screen.❌ If you click on the
Close the Overlay
button, nothing will happen.✅ But if you close the QuickLook first, then click on the button, the screen will be hidden.
I tried to implement this PR #1582 has it is about touch interaction.
When doing so, the
hitTest
method correctly detect the clicked button. But nothing happens after that (onPress
callback is not called)(this modification is not included in my reproduction reprository)
Do you understand why this happens?
Steps to reproduce
bug/react-native-screens-file-viewer
branch from the reproduction repositorydownload file
buttondownloadUrl
variable (if you don't trust the wikipedia source)open file viewer
button<FullWindowOverlay />
will open (I have to open it after the QuickLook View else it won't display on top of it)close the Overlay
button -> nothing happensa
it will close the overlay but don't do it yet)done
button from the QuickLook View (on top right) -> this close the file viewerclose the Overlay
button -> the overlay is closed correctlySnack or a link to a repository
https://github.com/Ldoppea/react-native-bug-reports/tree/bug/react-native-screens-file-viewer
Screens version
3.18.2
React Native version
0.66.4
Platforms
iOS
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 14
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: