Skip to content

Commit

Permalink
Add returnFocus option to resolve focus issues in file_ops (#4100)
Browse files Browse the repository at this point in the history
* Fix modal bug when file transfer fails

* Add returnFocus option to resolve focus conflict in file ops

* Remove returnFocus parameter and set to false by default
  • Loading branch information
ahmed-mgd authored Feb 18, 2025
1 parent 1bf5847 commit f55209a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dashboard/app/javascript/files/file_ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class FileOps {
.then(() => this.doneLoading())
.catch(e => {
this.doneLoading();
this.alertError('Error occurred when attempting to ' + summary, e.message)
this.alertError('Error occurred when attempting to ' + summary, e.message);
})
}

Expand Down Expand Up @@ -653,7 +653,7 @@ class FileOps {
$(CONTENTID).trigger(DATATABLE_EVENTNAME.reloadTable, eventData);
}

showSwalLoading (message) {
showSwalLoading(message) {
const eventData = {
'message': message,
};
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/app/javascript/files/sweet_alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class SweetAlert {
title: title,
allowOutsideClick: false,
showConfirmButton: false,
returnFocus: false,
willOpen: () => { Swal.showLoading() }
});
}
Expand Down

0 comments on commit f55209a

Please sign in to comment.