getflip / swirl

Flip's design system to help us work together to build a great experience for all of our customers.
https://swirl-storybook.flip-app.dev/
Other
12 stars 6 forks source link

SwirlFormControl: User-Input not marked if the user clicks directly on the input-field #818

Open SGlathe opened 2 months ago

SGlathe commented 2 months ago

Issue summary

In the Story-Books, the FormControls will focus and mark the users input if clicked on them. However, if the user clicks directly on the input-field that is wrapped by the FormControl, the input will not be marked.

Expected behavior

Clicking inside a FormControl should focus and mark the users input.

Actual behavior

The nested input is always focused, but only marked if any child of or the FormControl itself, except for the input-field, is clicked.

Steps to reproduce the problem

This can be reproduced in the current StoryBook: https://swirl-storybook.flip-app.dev/?path=/docs/components-swirlformcontrol--docs I will refer to the top-most "Form Control Label" to describe the reproduction-steps.

  1. Input anything.
  2. Click directly on the input-field. It will be focused, but the user-input is not marked.

Specifications