Fix Chrome dialog auto-dismiss with Bootstrap modals
- Add modal-alerts.js library with Bootstrap modal replacements - Replace all 15 confirm() calls with showConfirm/showDeleteConfirm - Auto-override window.alert() for all alert() calls - Fixes Chrome 132+ aggressively blocking native dialogs
This commit is contained in:
@@ -373,7 +373,7 @@ templ ServiceAccounts(data dash.ServiceAccountsData) {
|
||||
}
|
||||
|
||||
async function deleteSA(id) {
|
||||
if (confirm('Are you sure you want to delete this service account? This action cannot be undone.')) {
|
||||
showDeleteConfirm(id, async function() {
|
||||
try {
|
||||
const response = await fetch(`/api/service-accounts/${id}`, {
|
||||
method: 'DELETE'
|
||||
@@ -390,7 +390,7 @@ templ ServiceAccounts(data dash.ServiceAccountsData) {
|
||||
console.error('Error deleting service account:', error);
|
||||
showErrorMessage('Failed to delete: ' + error.message);
|
||||
}
|
||||
}
|
||||
}, 'Are you sure you want to delete this service account? This action cannot be undone.');
|
||||
}
|
||||
|
||||
async function handleCreateServiceAccount() {
|
||||
|
||||
Reference in New Issue
Block a user