kirby
kirby copied to clipboard
textarea element is missing some padding when used as a Block in a Layout field.
Description
When using the textarea
type instead of writer
for Text blocks in a Layout field, the input has no padding.
I couldn't figure out how to add line breaks with a writer
field (I want to display an address on multiple lines but within the same paragraph), so I created a file site/blueprints/blocks/text.yml
with the following content:
name: field.blocks.text.name
icon: text
wysiwyg: true
preview: text
fields:
text:
type: textarea
placeholder: field.blocks.text.placeholder
Expected behavior
The textarea
should have the same padding as when it's used in a regular textarea field.
Screenshots
To reproduce
Replace the text type by textarea
in blocks.
Your setup
Kirby version 4.2.0
Console output
none
Your system (please complete the following information)
- Device: macbook M1
- OS: macOS
- Browser: Firefox
- Version: 126.0.1
Additional context
The missing padding is defined in TextareaInput.vue
, but it looks like the selector is relying on being wrapped in an Input.vue
(given the .k-input[data-type="textarea"]
part), which doesn't seem to be the case when used within a Block.