yuanqing / create-figma-plugin

:battery: The comprehensive toolkit for developing plugins and widgets for Figma and FigJam
https://yuanqing.github.io/create-figma-plugin/
MIT License
902 stars 85 forks source link

[TextboxMultiline] unable to remove selection on focus #184

Open Profesor08 opened 10 months ago

Profesor08 commented 10 months ago

This code brings weird behavior to textarea, when I want to write something, it selects all content. And there is no way to remove this.

https://github.com/yuanqing/create-figma-plugin/blob/8f5246aa76899f081f9cf89b1a7b59a1b449fb3a/packages/ui/src/components/textbox/textbox-multiline/textbox-multiline.tsx#L88-L94

There are two options to solve this. First is to add an config, to disable this. Second is to to move ...rest to end, to allow to override props. https://github.com/yuanqing/create-figma-plugin/blob/8f5246aa76899f081f9cf89b1a7b59a1b449fb3a/packages/ui/src/components/textbox/textbox-multiline/textbox-multiline.tsx#L164-L180