cferdinandi / cferdinandi/reef

Bidirectional inputs move cursor

Open
#215 8 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
1.3k
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Hi - thanks for Reef. It looks really interesting and small. I tried converting one of my mini apps (a shoddy currency converter) to use Reef to learn more about it. This page uses two `input` fields. Writing into one changes the other. When porting to Reef, I noticed that the page re-renders cause the cursor to get moved around mid-edit. I wonder if there is a canonical way around this. For example, try select-all in one of the `input`s and type `123` to replace it.

**Test case:** https://codepen.io/gjnbnywp-the-vuer/pen/yyBXwea

Contributor guide

Open the contributing guide

Research direction

Reproduce the cursor movement with the linked CodePen, especially by selecting all in one input and typing 123 while the paired input updates. Trace the render path responsible for updating the two input fields and determine how editing should preserve cursor position. Done means bidirectional updates no longer move the cursor or disrupt replacement while both values stay synchronized.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.