framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
17.97k stars 3.24k forks source link

Svelte. Popup/f7Popup backdrop is not disposed onDestroy (With demo) #4266

Open ievgennaida opened 2 months ago

ievgennaida commented 2 months ago

Framework 7 popup backdrop remains when popup is unmounted in svelte.

  "dependencies": {
    "framework7": "^8.3.0",
    "framework7-svelte": "^8.3.0",
    "svelte": "^4.2.0"
  },
  "devDependencies": {
    "@sveltejs/vite-plugin-svelte": "^2.4.5",
    "vite": "^4.4.9"
  }

DEMO LINK: https://codesandbox.io/p/devbox/loving-visvesvaraya-vhyrxx?file=%2Fsrc%2Fcomponents%2Fapp.svelte%3A12%2C6

Platform and Target: Chrome

Describe the bug

  1. Open demo
  2. Click button to open popup
  3. Simulate that component is unmounted (Ex: using ifs in svelte)
  4. See that component is not unmouting related backdrop on dispose.

Expected behavior Popup is closed and unmounted with the backdrop overlay.

Actual Behavior Popup is closed but gray backdrop is displayed.