Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal fails to close and throws promise error #587

Closed
mjarmstrong opened this issue May 18, 2023 · 8 comments
Closed

Modal fails to close and throws promise error #587

mjarmstrong opened this issue May 18, 2023 · 8 comments

Comments

@mjarmstrong
Copy link

In latest version of Blazorstrap and Blazorstrap V5, the modal component doesn't close in any scenario; clicking the close button, clicking outside the modal, or clicking a cancel button which calls hideAsync.

Throws the following error in console...

blazorstrap.js:27 Uncaught (in promise) Error
at blazorstrap.js:27:20

This is even reproducible using the live examples on the BlazorStrap website here: https://blazorstrap.io/V5/V5/components/modal

In any of the live examples, try closing the modal and you'll see the behavior's above.

@Clive321A
Copy link

Clive321A commented May 18, 2023

I get a similar issue with latest version in that BSModal.WaitAsync() doesnt return, the modal displays, but system then hangs as WaitAsync() doesnt return

blazorstrap.js:27 Uncaught (in promise) Error
at blazorstrap.js:27:20

const timeout = (ms, message) => {
return new Promise((_, reject) => {
setTimeout(() => {
reject(new Error(message));
}, ms);
});
};

in 5.1.102.51723

Have reverted back to 5.1.100 , as 101 and 102 also showed this issue

@jbomhold3
Copy link
Collaborator

What Browser are you using so I can test I do not get the same results as you.

@jbomhold3
Copy link
Collaborator

line 27 is just a race if the animation fails to start

@mjarmstrong
Copy link
Author

@jbomhold3 I'm seeing the behavior using Google Chrome - Version 113.0.5672.127 (Official Build) (64-bit). Still seeing the issue in the live examples at the link below as well. Modal opens fine, but doesn't close using close icon, close button, or save changes button.

https://blazorstrap.io/V5/V5/components/modal
screenshot

@mjarmstrong
Copy link
Author

@jbomhold3 - the console error seems to fire anytime I try to close using any of the buttons.

@jbomhold3
Copy link
Collaborator

jbomhold3 commented May 19, 2023

By chance, are you getting animations? Also, hard reload the page. Wondering if the javascript file is cached for you at an older version

@jbomhold3
Copy link
Collaborator

ok can reproduce if I disable animations on my computer will get it fixed

@jbomhold3
Copy link
Collaborator

Resolved in https://www.nuget.org/packages/BlazorStrap/5.1.102.51923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants