chanan / BlazorStrap

Bootstrap 4 Components for Blazor Framework
https://blazorstrap.io
The Unlicense
916 stars 157 forks source link

V5 BSModal autocloses when another opens in a different tab #546

Closed DschaeffK closed 1 year ago

DschaeffK commented 2 years ago

BlazorStrap version: 5.0.106 .NET version: 6.0.8 usage: Blazor serverside

If I open a Modal in tab A, switch to tab B and open a Modal, the Modal in tab A closes automatically. Even if it is not the same Modal or even being on a different page. It only affects the serverside Blazor, in WASM the Modal does not close. Problem can easily be reproduced in a small project.

jbomhold3 commented 2 years ago

Why your not seeing the same thing in WASM surprises me. However, if your modal it's self is in side the tab its going to go away since easy time you change tabs your removing the contents of the tab from the dom. Modal should be placed outside of the tabs. The button that shows them can live in the tab, however.

DschaeffK commented 2 years ago

With tabs I mean the tab of the browser. It's the same thing with different browser windows. This issue originally came from internal testing, when a colleague on his computer opened a modal and when I on my computer opened a modal, he complained that his modal has closed automatically. After that I tested it myself with two different browser (Firefox/Edge) and two different browser tabs and the problem can be reproduced every time.

jbomhold3 commented 2 years ago

Ahh ok will look into it and see whats causing it.

DschaeffK commented 1 year ago

Any update on that? Been reading through #556. Does it have any affect on this issue?

jbomhold3 commented 1 year ago

I can't reproduce the issue on the current build likely did fix it.