In that particular app, the alert is in a while
loop:
while anvil.users.get_user() is None:
choice = anvil.alert(d, title="Log In", dismissible=True, buttons=BUTTONS)
Unless the user logs in with the alert, anvil.users.get_user()
will be None
, and so the loop will continue, and the alert will be continously re-created.
At the end of the loop, there is:
elif choice is None and allow_cancel:
break
So if you want to simply break out of the loop if the alert is dismissed, set allow_cancel=True
.