Is there a way to have a synced slug
field being disabled, but still selectable for copying, like a readonly input? As soon as I set it to disabled: true
I can no longer select the slug text with the cursor.
You could hack it with some CSS rules. The problem is the pointer-events: none
that we apply to all disabled/fields and inputs. If you reset that for your specific case, this should be safe and enable you to select the text.
I have added an issue because I think this is an undesirable behavior on Kirby’s end in general: `pointer-events: none` on disabled fields/inputs · Issue #7493 · getkirby/kirby · GitHub
Many thanks, Nico. That helped a lot.
Had to amend two CSS rules to make the disabled slug
field not only selectable, but actually copy-able, in my case.
.k-field[data-disabled=“true”] input.k-slug-input {
pointer-events: auto;
}
input.k-slug-input:where(:disabled) {
cursor: text;
}