Add more detailed modal debugging
- Log modal element to verify it exists - Check for existing modal instance before creating new one - Log each step of modal creation and show process This helps identify why modal.show() isn't displaying the modal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,17 @@ function openEditModal(id){
|
||||
$("#editAcct .modal-content").load(link, function(response, status, xhr) {
|
||||
console.log('Load status:', status);
|
||||
if (status == "success") {
|
||||
var modal = new bootstrap.Modal(document.getElementById('editAcct'));
|
||||
var modalElement = document.getElementById('editAcct');
|
||||
console.log('Modal element:', modalElement);
|
||||
|
||||
// Get or create modal instance
|
||||
var modal = bootstrap.Modal.getInstance(modalElement);
|
||||
if (!modal) {
|
||||
console.log('Creating new modal instance');
|
||||
modal = new bootstrap.Modal(modalElement);
|
||||
}
|
||||
|
||||
console.log('Showing modal');
|
||||
modal.show();
|
||||
} else {
|
||||
console.error('Failed to load modal content:', xhr.statusText);
|
||||
|
||||
Reference in New Issue
Block a user