-
Notifications
You must be signed in to change notification settings - Fork 62
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
onOutsideClick get fired when body of popup get clicked (when lazy created) #13
Labels
Comments
+1 |
Sorry for late reply. I think we can avoid handler be executed when
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
found an issue with the
onOutsideClick
handler. It get fired even if I click input field inside the popup.(Note that this is not duplicate with previous reported issue)
If I render
SweetAlert
but don't show it yet and later on change theshow:true
, then this invalid behavior happens. If I haveshow:true
on initial render time, then everything works.Looks like that if it's
show:false
, whenregisterOutsideClickHandler
get executed, itdocument.getElementsByClassName('sweet-alert')
returns null (of course because the popup is not created.Found out that if I move the
registerOutsideClickHandler
fromcomponentDidMount
after the place insetupWithProps
where it creates the popup then it starts to work.The text was updated successfully, but these errors were encountered: