Skip to content

[Modal with Dimmer] Modal element reload without flashing #3176

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

Open
mvorisek opened this issue Feb 21, 2025 · 0 comments
Open

[Modal with Dimmer] Modal element reload without flashing #3176

mvorisek opened this issue Feb 21, 2025 · 0 comments
Labels
type/feat Any feature requests or improvements

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Feb 21, 2025

Feature Request

Steps to reproduce:

  1. open https://jsfiddle.net/mxrqjv62/
  2. click "dimmer", ie. black backgound to trigger modal close
  3. notice "original dimmer" is shortly displayed, ie. modal with "1" text

When modal is closed (step 2) using modal close button, the unwanted step 3 does not happen.

The issue is "modal element" attaches events to "dimmer element", but when "modal element" is removed from DOM, the events are still attached.

In atk4/ui we need this to be able to reload whole modal - atk4/ui#2262.

I would expect Fomantic-UI modal module to behave like this:
When modal module is initialized (line 23 in repro), check the modal state based on classes (set on line 21) and when the state is "active", it means the modal is "active and shown" (like if $modal.modal('show') was called, but without flashing) and the previous modal/dimmer should be fully garbage collected in favor of the new one.

@mvorisek mvorisek added state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/feat Any feature requests or improvements labels Feb 21, 2025
@lubber-de lubber-de removed the state/awaiting-triage Any issues or pull requests which haven't yet been triaged label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feat Any feature requests or improvements
Projects
None yet
Development

No branches or pull requests

2 participants