Semantic-ui: Modal keeps stacking

Created on 19 Apr 2020  ·  3Comments  ·  Source: Semantic-Org/Semantic-UI

✖ USAGE QUESTIONS → Use these dedicated resources:
Docs - http://www.semantic-ui.com
Chat - https://gitter.im/Semantic-Org/Semantic-UI
SO - https://stackoverflow.com/questions/tagged/semantic-ui?sort=votes

✔ Enhancements → Be specific. Assume backwards compatibility is a necessity. Suggest implementation when possible.
✔ BUGS → ❤❤❤. Keep in mind some bugs may not be immediately fixable due to backwards compatibility or CSS limitations.

Title (Put in field above)

Use the format: [Component] Component Should Do X
i.e. [Checkbox] onChange Should Fire When Update Triggered via DOM

Steps

I am loading different html pages using jQuery.load (to navigate to different pages when using sidebar). On one page, I have a form that when submitted should show a modal to confirm submission with the forms data. However, when I leave the page and return to it, and submit the form again, I get two modals that stack on top of each other. When I exit and return again, I get three of the same modals (etc)

$('#myForm').submit(function (event) {
   event.preventDefault();

   //Do some stuff

   $('#myModal').modal('show');
});

Expected Result

I want the modal to show only once every time (even when I go to another page and back to the original page).

Actual Result

The modals keep stacking on top of each other.

Version

2.4.2

Testcase

Most helpful comment

This repo is deprecated, please use fomantic UI

All 3 comments

This repo is deprecated, please use fomantic UI

Ah man, been working with this framework for a few months and only now I see Fomantic UI! (I mean, I knew SUI was inactive). Stumbled on this trying to diagnose a modal issue.

At the very least, could the SUI maintainer _please_ link to this project in the README or project description??

Not really, SUI maintainers don't consider it to be deprecated, they continued saying that it is maintained for 4 years of radio silence and then community forked it

Was this page helpful?
0 / 5 - 0 ratings