Skip to content

Commit c24d5a2

Browse files
committed
fix: non-functional confirm
1 parent 68e6f30 commit c24d5a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/plugins/features/confirm.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export class ConfirmPlugin implements DatagridPlugin {
1717
}
1818

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

23-
if (!this.confirm(message)) {
23+
if (!window.confirm.bind(window)(message)) {
2424
e.stopPropagation();
2525
e.preventDefault();
2626
}

0 commit comments

Comments
 (0)