Repository navigation
Commit f2f2382
committed
fix(live-preview): keep CM edits from being undone by stale md viewer reports
The md viewer flushes its own debounced edit when the same file is
switched to again, and that report could reach Phoenix just after the
next CM edit. MarkdownSync applied it, silently undoing the CM change,
and the viewer then synced back the reverted text. This made the
"editing code block content in CM sync to viewer" test flaky on CI.
While a CM change is still waiting to be sent to the iframe, the iframe
has not seen it, so its content reports are stale: ignore them and let
the pending update bring the iframe up to date.1 parent ab75b6e commit f2f2382
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| |||
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
| |||
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
675 | 686 | | |
676 | 687 | | |
677 | 688 | | |
| |||
0 commit comments