Skip to content
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

image and gallery block drawers not fully closing when navigating away #6778

Open
silllli opened this issue Oct 29, 2024 · 4 comments
Open
Labels
type: bug 🐛 Is a bug; fixes a bug

Comments

@silllli
Copy link
Contributor

silllli commented Oct 29, 2024

Description

When accessing a file from an image or gallery block drawer, leftovers of the drawer remain visible.

Expected behavior
See the file view without bugs.

Screenshots
Bildschirmfoto 2024-10-29 um 15 00 55

To reproduce

  1. Open an instant online demo
  2. Go to the Blog example
  3. Open the first article
  4. Open the image block drawer
  5. Click on the file
  6. See the broken file view

Your setup

Kirby Version
4.4.1

Console output
Nothing unusual

Your system (please complete the following information)

  • Device: MacBook Pro 16" (2019)
  • OS: macOS 15.1
  • Browser: Safari
  • Version: Version 18.1 (20619.2.8.11.10)
@silllli
Copy link
Contributor Author

silllli commented Nov 4, 2024

It also happens when clicking on a user of a users field inside an open drawer.

@afbora afbora added the type: bug 🐛 Is a bug; fixes a bug label Dec 10, 2024
@afbora
Copy link
Member

afbora commented Dec 10, 2024

I think we need to fix with beforeunload event. Maybe we can solve this with the beforeunload listeners newly added to v5. I've tried to fix it in v4 and v5 but couldn't achieve it.

Something like that:

mounted() {
    this.$events.on("beforeunload", this.close);
},
destroyed() {
    this.$events.off("beforeunload", this.close);
},

@distantnative
Copy link
Member

@afbora Have you tried that? I don't think the get called when navigating around the Panel, just leaving the Panel/closing the browser.

@afbora
Copy link
Member

afbora commented Dec 10, 2024

@distantnative Yes, I tried but I thought it would work during page transitions but it didn't. Maybe I couldn't do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants