FormidableLabs / FormidableLabs/use-editable

Defocus every first typing

Open
#30 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
619
Forks
16
PR merge metrics
No merged PRs in 30d

Description

When you try to type the text for the first time, it will re-render and defocus from the input box.
So you need to select the input box and type again (it's annoying)

My workaround is force re-rendering for the first load. Is there another solution to fix this problem ??

Here is an example: [code sandbox](https://codesandbox.io/p/devbox/astro-code-editor-867yh6?file=%2Fsrc%2Fcomponents%2FEditor.tsx%3A14%2C20).

**Environments**
```
- astro: 4.0.3
- @astrojs/react: 3.0.7
- react: 18.2.0
- use-editable: 2.3.3
- prism-react-renderer: 2.3.0
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.