Confirmation dialog behavior

i am trying to access user location when page loads, i have incorporated dcc.confirmdialog and dcc.geolaction in my page layout: dcc.Geolocation(id='geolocation', high_accuracy=True, show_alert=True), dcc.ConfirmDialog(id='confirm-dialog', message="This application will access your location. Do you want to proceed?") and using callbacks like : @callback( Output('confirm-dialog', 'displayed'), [Input('update-map', 'n_clicks')], [State('confirm-shown', 'children')] ) def show_confirm_dialog(n_clicks, confirm_shown): if n_clicks and confirm_shown != 'shown': return True return False and @callback( Output('confirm-shown', 'children'), [Input('confirm-dialog', 'submit_n_clicks'), Input('confirm-dialog', 'cancel_n_clicks')] ) def update_confirm_shown(submit_n_clicks, cancel_n_clicks): if submit_n_clicks or cancel_n_clicks: return 'shown' return '', when i click ‘ok’ button to allow location access, my app works fine, but when i click on cancel, it shows message 'permission is required '. now, to show the permission message again i have to refresh the page, if i click on find button, it remains on the same state i.e. showing the message ‘permission is required’. i want, if i click again on find button, it will show the permission dialog instead on refreshing the and then clicking the find button.

Hey @Ahmad7886 could you please format your code for better readability?