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

Modalize doesn't clear hardwareBackPress at component unmount #111

Closed
Grohden opened this issue Jan 9, 2020 · 5 comments
Closed

Modalize doesn't clear hardwareBackPress at component unmount #111

Grohden opened this issue Jan 9, 2020 · 5 comments
Labels
🤕 Valid issue Something isn't working

Comments

@Grohden
Copy link
Contributor

Grohden commented Jan 9, 2020

#35 related

Looking at this commit, it seems that the remove listener call was moved to the closeAnimation, but removing it from the componentWillUnmount will make the listener always be active when only a unmount occur (such as something bad like cond ? null : <Modalize .../>)

@jeremybarbet
Copy link
Owner

Hi,

I didn't think about this behaviour, since Modalize is always there in my apps/examples. You could provide a PR if you have a fix, it shouldn't be complicated,

@jeremybarbet jeremybarbet added the 🤕 Valid issue Something isn't working label Jan 28, 2020
@itsam
Copy link

itsam commented Feb 15, 2020

I second that. It is actually a bug.Thank you in advance

Grohden added a commit to Grohden/react-native-modalize that referenced this issue Feb 17, 2020
This should fix the jeremybarbet#111, where one could do: `cond ? <Modalize ...> : null`, and a `cond=false` could cause the modalize to keep listening to back press events
@Grohden
Copy link
Contributor Author

Grohden commented Feb 17, 2020

@jeremybarbet @itsam I was using a patch package patch for this, so I wasn't in a hurry for it. But anyway #137 should fix the problem.

@itsam
Copy link

itsam commented Feb 17, 2020

@Grohden Thanks a lot.

jeremybarbet pushed a commit that referenced this issue Feb 18, 2020
This should fix the #111, where one could do: `cond ? <Modalize ...> : null`, and a `cond=false` could cause the modalize to keep listening to back press events
@jeremybarbet
Copy link
Owner

jeremybarbet commented Feb 18, 2020

Fixed by @Grohden and released in 1.3.7-rc.6

marcinolek pushed a commit to marcinolek/react-native-modalize that referenced this issue Feb 20, 2020
This should fix the jeremybarbet#111, where one could do: `cond ? <Modalize ...> : null`, and a `cond=false` could cause the modalize to keep listening to back press events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤕 Valid issue Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants