getkirby / kirby

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

textarea element is missing some padding when used as a Block in a Layout field. #6484

Open kimlai opened 2 weeks ago

kimlai commented 2 weeks ago

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

Capture d’écran 2024-06-12 à 18 16 34

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)

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.