react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

FullWindowOverlay - UI is not touchable when over iOS file-viewer's QuickLook

Open Ldoppea opened this issue 2 years ago • 6 comments

Description

Hi,

Note I found this issue that is also about interaction problem #1663. But i'm not sure if it is related or not

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 anymore

I created a reproduction repository. Here is what is displayed: simulator_screenshot_9BE7F4BB-8188-4C43-A184-76287E763D2A

✅ 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) image

Do you understand why this happens?

Steps to reproduce

  • Checkout the bug/react-native-screens-file-viewer branch from the reproduction repository
  • Build the app and open it on iOS
  • Click the download file button
    • This will download a png from Wikipedia so we have a file that can be used by react-native-file-viewer
    • ℹ️ You can change the image source for another by editing the downloadUrl variable (if you don't trust the wikipedia source)
  • Click the open file viewer button
    • The file viewer will open
    • 2s later, the <FullWindowOverlay /> will open (I have to open it after the QuickLook View else it won't display on top of it)
  • Click the close the Overlay button -> nothing happens
  • Click the text input and enter some text -> works (if you enter a it will close the overlay but don't do it yet)
  • Click the done button from the QuickLook View (on top right) -> this close the file viewer
  • Click the close the Overlay button -> the overlay is closed correctly

Snack 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

Ldoppea avatar Dec 14 '22 11:12 Ldoppea