Skip to content

Commit

Permalink
fix: non-functional confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
conflictboy committed Jan 24, 2025
1 parent 68e6f30 commit c24d5a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/plugins/features/confirm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export class ConfirmPlugin implements DatagridPlugin {
}

confirmEventHandler(this: Datagrid, el: HTMLElement, e: Event) {
const message = el.getAttribute(ConfirmAttribute)!;
const message = el.closest('a').getAttribute(ConfirmAttribute)!;
if (!message) return;

if (!this.confirm(message)) {
if (!window.confirm.bind(window)(message)) {
e.stopPropagation();
e.preventDefault();
}
Expand Down

0 comments on commit c24d5a2

Please sign in to comment.