getkirby / kirby

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

[3.6.x] Save bar disabled in file view, which has been opened from within an open structure field #4012

Closed ralfgoeke closed 2 years ago

ralfgoeke commented 2 years ago

Description

When opening the editing mode of a file via a files field inside an expanded structure field, the save bar on the file editing page is disabled (dimmed). After a page reload, everything is working as expected.

Expected behavior
The save / revert bar should be working without reload

Screenshots
See an animated GIF here: https://cln.sh/XY0fZd (CleanShot)

To reproduce

In a freshly downloaded plainkit

# site/blueprints/pages/default.yml

title: Default Page
fields:
  test:
    label: Test
    type: structure
    fields:
      mytext:
        label: Some Text
        type: text
      mypdf:
        label: PDF-File
        type: files
        multiple: false
# site/blueprints/files/default.yml

fields:
  test:
    label: Test
    type: text
  1. Open Home Page in Panel
  2. Add new structure entry
  3. Upload a new file
  4. save structure entry
  5. expand that items' editing mode again
  6. Click on the file icon, to open its editing page
  7. type in some text in the test field
  8. see, that the bottom save bar shows, but is disabled and thus dysfunctional
  9. reload page
  10. see, that the bottom save bar is now enabled and functional

Your setup

Kirby Version
3.6.0 / 3.6.1

Console output
none

Your system (please complete the following information)

Additional context
The Problem is not existent, when opening the file via a structure field preview

afbora commented 2 years ago

Also I can reproduce the issue on 3.5.7.1

bastianallgeier commented 2 years ago

We block the form buttons when opening the form in the structure field and it looks like this is not really unblocked when you navigate away.

dominikfoeger commented 2 years ago

I can reproduce this with an old 3.4.2.

createForm() in StructureField.vue dispatches the content/disable action, but neither k-form, k-files, k-list nor k-list-item enables it again. I think k-structure-field is responsible for enabling, so I guess it should check the input inside onInput().

afbora commented 2 years ago

I can confirm that this issue fixed on 3.7 releases ✅