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

[v5] Issue with when Conditions and drag & drop File Uploads in Kirby 5 Beta #6889

Open
jirichlebus opened this issue Jan 9, 2025 · 0 comments

Comments

@jirichlebus
Copy link

jirichlebus commented Jan 9, 2025

Description

When using when conditions in blueprints with a radio field controlling the visibility of other fields, the value of the radio field resets unexpectedly during drag & drop file uploads in a files field. This causes a frustrating user experience where the field linked to the when condition disappears, even though the file upload is successful.

To reproduce

  1. Create a blueprint with the following structure:
sections:
  test:
    type: fields
    fields:
      radioField:
        label: Select an option
        type: radio
        default: option1
        options:
          option1: Option 1
          option2: Option 2
      conditionalField:
        label: Upload an image
        type: files
        when:
          radioField: option2
  1. In the panel, select Option 2 in the radioField (do not save changes).
  2. Drag & drop a file into the conditionalField.
  3. Observe that the radioField value resets to option1, causing the conditionalField to disappear (although the file was correctly uploaded to Kirby).

Expected Behavior

The value of the radioField should not reset during the file upload process, and the conditionalField should remain visible.

Actual Behavior

The radioField value resets to its default (option1).
The conditionalField disappears immediately after the file is uploaded, even though the file upload itself is successful.

Setup

Kirby Version v5.0-beta.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant