formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
97 stars 3 forks source link

Text field grows on focus out in safari #178

Closed b-graves closed 9 months ago

b-graves commented 9 months ago

See gif, in safari, the text field grows each time the focus is lost

zFMEADUz9J

code as follows:

<View direction="row" align="end" padding={3}>
  <View.Item>
    <TextField
      name="search"
      placeholder="Search projects"
      onChange={(e) => setGlobalFilter(e.value)}
      value={globalFilter}
    />
  </View.Item>
  <View.Item gapBefore="auto">
    <Button color="primary" onClick={onCreateNew}>
      New Project
    </Button>
  </View.Item>
</View>
blvdmitry commented 9 months ago

Thanks for heads-up, I'll take a look today and will release a patch once it's ready

blvdmitry commented 9 months ago

Should be fixed in 2.4.3 https://codesandbox.io/s/nervous-murdock-kxgrnj?file=/src/App.tsx

We were using percentage values calc for the negative margin/padding on the input to make input work with the start/end slots without hardcoding their size like other libraries do. For the fix I've updated it to using a relatively large fixed px value.