Skip to content

[Panel] Child elements of disabled fields can be click #2170

@afbora

Description

@afbora

Describe the bug
The disabled structure field can be clicked and the form opens.

To Reproduce
Steps to reproduce the behavior:

  1. Go to panel
  2. Add structure field with disabled and filled to any page
  3. Edit the page and click structure table
  4. Row form is opening

Blueprint:

fields:
  addresses:
    label: Addresses
    type: structure
    disabled: true
    fields:
      street:
        label: Street
        type: text
      zip:
        label: ZIP
        type: text
      city:
        label: City
        type: text

Expected behavior
Rows can't be clicked, so the field data shouldn't be opened.

Screenshots
disabled

Kirby Version
3.2.5

Related PR #2069

Desktop

  • Windows 10
  • Chrome 77.0.3865.90

Additional context
I have few tests on related PR. Maybe this can give you an idea.
This issue is related to the child elements of the disabled field.
The same issue exists for translate: false option on disabled field when switch the language.
Btw when you try to save that opened form, the data does not save and no problem there.

Issue line:
https://github.com/afbora/kirby/blob/develop/panel/src/components/Forms/Field.vue#L102-L104

Currently not working

k-field[data-disabled] *:not(.k-text[data-theme=help])

Structure field working (not clickable when disabled) but help links not working

k-field[data-disabled] *:not([data-theme=help])

I have no idea why it didn't work together.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions