❔ Bootstrap modal in razor page closing for one page but not another

When I click the plus button on my application a modal pops up. (good) But when I click any button in the modal it closes (this may work for what I am doing but not sure why). I have
<div class="modal-footer">
<button class="btn btn-primary">Submit</button>
<button class="btn btn-secondary">Close</button>
<button @onclick="Debug">Sample</button>
</div>
<div class="modal-footer">
<button class="btn btn-primary">Submit</button>
<button class="btn btn-secondary">Close</button>
<button @onclick="Debug">Sample</button>
</div>
And the debugger is not hitting by Debug function in VS. Not sure the best way to debug this. In another page I have buttons in the footer and none of them will close the modal. I want to investigate why the behavior differs in these two instances.
12 Replies
gianmonky
gianmonky2y ago
What is the difference between the other modal that works and this one?
sea cryptid
sea cryptidOP2y ago
I really can't find any difference. Let me link the code though. It's in a public repo.
gianmonky
gianmonky2y ago
ok
gianmonky
gianmonky2y ago
sure is public ?
sea cryptid
sea cryptidOP2y ago
lol hold on
gianmonky
gianmonky2y ago
ok jaja
sea cryptid
sea cryptidOP2y ago
Try now? Are you able to view it now? @Gian Alright; well if anyone sees this, would definitely appreciate any help troubleshooting this.
Henkypenky
Henkypenky2y ago
closes up for me, btw you are targeting .net core 3.1 which is on end of support, i switched to .net 7 and works fine
Henkypenky
Henkypenky2y ago
let me know if that wasn't the modal btw
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server