diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 128510531f7..3b35884692d 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 9.3.1-beta38 + 9.3.1-beta39 diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.js b/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.js index b6aadfbf311..def41f9a6af 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.js +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.js @@ -5,7 +5,6 @@ import EventHandler from "../../modules/event-handler.js" const config = { class: 'popover-confirm', - dismiss: '.popover-confirm-buttons > div', popoverSelector: '.popover-confirm.show' } @@ -63,22 +62,6 @@ export function init(id) { EventHandler.on(el, 'inserted.bs.popover', confirm.inserted) EventHandler.on(el, 'hide.bs.popover', confirm.hide) - if (config.dismiss != null) { - confirm.dismissHandler = e => { - const ele = e.target.closest(config.popoverSelector) - if (ele) { - const element = getDescribedOwner(ele) - if (element) { - const popover = bootstrap.Popover.getInstance(element); - if (popover) { - popover.hide() - } - } - } - } - EventHandler.on(document, 'click', config.dismiss, confirm.dismissHandler) - } - confirm.checkCancel = el => { // check button let self = el === confirm.el || el.closest('.dropdown-toggle') === confirm.el @@ -170,9 +153,6 @@ export function dispose(id) { if (confirm.popover) { confirm.popover.dispose(); } - if (config.dismiss) { - EventHandler.off(document, 'click', config.dismiss, confirm.dismissHandler) - } } } diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor b/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor index 9efcb76e31c..d56520630ce 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor @@ -10,8 +10,8 @@
@if (ChildContent != null) { - - + + @ChildContent diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs b/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs index 6ca5c43be95..70fd7ec5c05 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs @@ -121,6 +121,7 @@ protected override void OnParametersSet() /// public async Task OnCloseClick() { + await InvokeVoidAsync("hide", Id); if (OnClose != null) { await OnClose(); @@ -132,21 +133,10 @@ public async Task OnCloseClick() /// public async Task OnConfirmClick() { + await InvokeVoidAsync("hide", Id); if (OnConfirm != null) { await OnConfirm(); } } - - private async Task TriggerCloseAsync() - { - await InvokeVoidAsync("hide", Id); - await OnCloseClick(); - } - - private async Task TriggerConfirmAsync() - { - await InvokeVoidAsync("hide", Id); - await OnConfirmClick(); - } }