For #2806, refresh child editor on timeout after redraw event

See notes in the comment in the code. This is a workaround for https://github.com/marijnh/CodeMirror/issues/1226--we could remove it if that gets fixed.