choojs / choojs/choo

text field loosing state on `render`

Open
#579 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.8k
Forks
573
PR merge metrics
No merged PRs in 30d

Description

### Expected behavior
Input fields should retain their state (and possibly focus as well as cursor position) regardless of `emitter.emit('render')`

### Actual behavior
Text input fields loose their state/value on rendering.

### Steps to reproduce behavior
Minimally adjusted code from the README shows the described behaviour: http://requirebin.com/?gist=829488013f4333ed528825df65c6a406

Contributor guide

Open the contributing guide

Research direction

Start with the README example and the linked RequireBin reproduction, then trace how emitter.emit('render') updates text input fields. The issue is done when rendering preserves each input's value, and, where supported, its focus and cursor position.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.