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:
@@ -1056,7 +1056,7 @@ templ TaskDetail(data *maintenance.TaskDetailData) {
|
||||
}
|
||||
|
||||
function cancelTask(taskId) {
|
||||
if (confirm('Are you sure you want to cancel this task?')) {
|
||||
showConfirm('Are you sure you want to cancel this task?', function() {
|
||||
fetch(`/api/maintenance/tasks/${taskId}/cancel`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -1076,7 +1076,7 @@ templ TaskDetail(data *maintenance.TaskDetailData) {
|
||||
console.error('Error:', error);
|
||||
alert('Error cancelling task');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function refreshTaskLogs(taskId) {
|
||||
|
||||
Reference in New Issue
Block a user