Skip to content

Cannot close popover by clicking backdrop after upgrading to 9.0 #4348

@mayswind

Description

@mayswind

Describe the bug

After upgrading to Framework7 9.0, I found that the popover seems to trigger popoverOpened twice because of the following code. This causes the click handler to be registered twice.

Image

After switching to other pages, any click attempts to interact with a destroyed popover, which then leads to errors, and popovers on subsequent pages can no longer be closed by tapping the backdrop.

Image

To Reproduce

Steps to reproduce the behavior:

  1. Open the above CodeSandbox link
  2. Click '1, First Show Popover'
  3. Click '2, Then Go to Page2'
  4. Click '3, Then Go to Page3'
  5. Click '4, Then Show Popover'
  6. Then, you will see the below error in the console, and you cannot close the popover by clicking the backdrop
Image

Expected behavior

Can close popover by clicking backdrop.

Actual Behavior

See above

Screenshots

See above

Additional context

See above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions