Khan / Khan/live-editor

changing a single character causes `runCode` to be called twice

Open
#440 2 comments 0 reactions 0 assignees View on GitHub
pjs
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

Steps to reproduce:
- write a program the draws a `rect`
- put a breakpoint in `runCode` in live-editor.output.js
- highlight the first char of one of the numbers and change it
- notice that `runCode` fires twice

We should avoid doing this so that we're not wasting CPU/battery.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in live-editor.output.js and reproduce the issue by placing a breakpoint in runCode, then changing one selected character in a number from a program that draws a rect. Trace why the edit triggers runCode twice. Done means the same edit invokes runCode only once without changing the resulting program behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.