uikit icon indicating copy to clipboard operation
uikit copied to clipboard

Spaces don't affect the Input flex box

Open wrangelvid opened this issue 1 year ago • 2 comments

An Input component does only flex when characters are typed but not with trailing spaces. Here is an example.

When focussing on the input and moving the curser beyond the Oh Oh., we can see that it leaves the border. Try adding more spaces and you will see the cursor wanders off to a journey far far beyond it's borders :)

        <Input
          borderWidth={2}
          borderRadius={6}
          textAlign="left"
          verticalAlign="top"
          focus={{ borderColor: 'orange' }}
          borderColor="black"
          value={text}
          defaultValue="Oh Oh.   "
          onValueChange={setText}
          minWidth={20}
        />

wrangelvid avatar Jun 06 '24 14:06 wrangelvid

@wrangelvid

what do you mean with "an input component flexes". Are you referring to new lines?

bbohlender avatar Sep 26 '25 16:09 bbohlender

If I remember correctly, for a single line the container did not grow when we typed white spaces. It only grew for characters.

wrangelvid avatar Sep 26 '25 16:09 wrangelvid