getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

Drawer keeps open when browser back/forward used #6030

Open afbora opened 10 months ago

afbora commented 10 months ago

Description

  1. Go to panel site dashboard
  2. Than go to any page that have blocks/layout/structure field (for drawer)
  3. For ex: edit any block item and you'll see drawer open
  4. Then use browser back (without click, for ex with mouse back key)
  5. See issue that you'll redirected to site dashboard but drawer still open

Your setup

Kirby Version
4.0.0

bastianallgeier commented 10 months ago

I cannot replicate this unfortunately.

afbora commented 10 months ago

@bastianallgeier Ah I found correct steps. Issue happened with structure field in blocks field.

  1. Go to panel site dashboard
  2. Then go to any page that have blocks field that have structure field (for drawer)
  3. For ex: edit any block item and you'll see drawer open
  4. Then edit a structure row
  5. Use browser back while you editing a input in structure row (without click, for ex with mouse back key)
  6. See issue that you'll redirected to site dashboard but drawer still open
afbora commented 10 months ago

I think this issue related with nested blocks not with just structure field in blocks field.

github-actions[bot] commented 8 months ago

This issue has been marked as stale because it requires further input but has not seen activity in the past months. This is for us to prioritize issues that are still relevant and actionable. It will be closed if no further activity occurs within the next 15 days. If this issue is still relevant to you, please help us in gathering the necessary input.

afbora commented 8 months ago

Stil valid issue for me in 4.1.0-RC3:

https://github.com/getkirby/kirby/assets/3393422/4544f949-4e4b-498c-b05d-c4f7cf62aa18

afbora commented 8 months ago

Also getting console error:

TypeError: Cannot read properties of null (reading '$invalid')

distantnative commented 6 months ago

@bastianallgeier could this be related to https://github.com/getkirby/kirby/issues/6274 ?

distantnative commented 6 months ago

@afbora I think he other issue is indeed the same. The key part was that it's about not a normal drawer, but a nested drawer open. And so on back, only one drawer level closes instead of all.

Could you please test if https://github.com/getkirby/kirby/pull/6363 also solves this issue?

afbora commented 6 months ago

@distantnative That PR solves the issue only partially. After browser back still a shadow layer visible. It's gone when you click to anywhere.