Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.6.3</Version>
<Version>9.6.4-beta01</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/BootstrapBlazor/Components/Toast/Toast.razor.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function init(id, invoke, callback) {
invoke.invokeMethodAsync(toast.callback)
})
EventHandler.on(progressElement, 'transitionend', e => {
toast.toast.hide();
if (toast.toast._config.autohide === false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Reverse autohide logic: only hide on manual dismiss

Invert the condition so toast.hide() runs when _config.autohide is true instead of false.

toast.toast.hide();
}
});

toast.toast.show();
Expand All @@ -42,8 +44,6 @@ export function update(id) {
const autoHide = element.getAttribute('data-bs-autohide') !== 'false';
if (autoHide) {
const delay = parseInt(element.getAttribute('data-bs-delay'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (bug_risk): Restore updating autohide in update method

Without that assignment, changes to data-bs-autohide won’t update the toast instance, causing stale behavior. Re-add it or otherwise sync autohide on update.

Suggested change
const delay = parseInt(element.getAttribute('data-bs-delay'));
const autoHide = element.getAttribute('data-bs-autohide') !== 'false';
toast._config.autohide = autoHide;


toast._config.autohide = autoHide;
toast._config.delay = delay;

progressElement.style.width = '100%';
Expand Down