Skip to content
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

App Crashing when trying to display tooltip in different screen #145

Open
SherifMega opened this issue Sep 30, 2022 · 5 comments
Open

App Crashing when trying to display tooltip in different screen #145

SherifMega opened this issue Sep 30, 2022 · 5 comments

Comments

@SherifMega
Copy link

if you are trying to display popover from different screen (it leads app to crash)

so imagine this scenario

  • open screen 1
  • click on button which after specific timeout display popover
  • navigate to screen 2 before timeout finished and stay there
  • app is crashed

Screen Shot 2022-09-30 at 4 36 00 PM

why because after some tracking in package itself
in AdaptivePopover.js
Screen Shot 2022-09-30 at 4 34 16 PM
in case 5
rect is {"height": undefined, "width": undefined, "x": undefined, "y": undefined}

which leads to a lot of style errors in BasePopover.js

Device/Setup Info:

  • Device: [Nexus one]
  • OS: [Android 11]
  • react-native version: [0.69.5]
  • react-native-popover-view version: [5.1.2]
@rxliuli rxliuli mentioned this issue Oct 8, 2022
@rxliuli
Copy link
Contributor

rxliuli commented Oct 8, 2022

Temporarily fixed and released: react-native-popover-view-fix-145

@SherifMega
Copy link
Author

Thanks @rxliuli ❤️ 🙏 it's fixed crash

but still there's blocking in another screen so you can't navigate or click at any element.

for ex screen x & screen y
tooltip in screen x

then navigate before display tooltip in screen x to screen y
after tootlip appeared in screen x
you can't navigate or click at anything in screen y

@rxliuli
Copy link
Contributor

rxliuli commented Oct 8, 2022

Thanks @rxliuli ❤️ 🙏 it's fixed crash

but still there's blocking in another screen so you can't navigate or click at any element.

for ex screen x & screen y tooltip in screen x

then navigate before display tooltip in screen x to screen y after tootlip appeared in screen x you can't navigate or click at anything in screen y

I didn't encounter the problem you said, maybe you can modify it again

SteffeyDev added a commit that referenced this issue Oct 20, 2022
@SteffeyDev
Copy link
Owner

@rxliuli 's fixed released as 1.5.6, please test and remove your NPM package if this works.

@SherifMega Can you provide more details on what you mean by screen? Are you using a navigation library? Can you reproduce in an expo snack?

@SherifMega
Copy link
Author

SherifMega commented Oct 20, 2022

@SteffeyDev
i mean here not just switching screens only

if popover isn't within screen view the screen is blocked and you can not do any action if it's popover tried to appear.

for example here in expo snack
flat list with 20 item

  • if you tried to fire popover and you see the element it will work fine
  • if onPress action will take some time to fire popover then you quickly scroll up before popover appeared and it's appeared after you scroll up in background it will block your screen.
    (same with screen navigation if you fired popover and it takes sometime to appear then you moved to other screen it will block also to access anything)

https://snack.expo.dev/@shrief/popover-bug

Record_2022-10-20-12-30-00.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants