framework7io / framework7

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

Svelte. Popover cannot be closed when link is external and routing is prevented. (With DEMO) #4267

Open ievgennaida opened 5 months ago

ievgennaida commented 5 months ago

Popover property "popoverClose" is ignored when when link/list item is used to change route anchor (external, close.

  "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"
  }

Describe the bug

Link is confired to just change the hash of the URL. Example to add #page1 to the url route. When configured with external and preventRouter={true} than parent popver cannot be closed.

To Reproduce

  1. Open demo.
  2. Click button to open popover.
  3. Click link to close popover.
  4. See that hash is applied on link click.
  5. See that popover remains.

Expected behavior

Popover should be closed when popoverClose is added to the link tags.

Actual Behavior

Popover remains opened.