kate522
49f1212e33
fix(submit): keep the editor iframe tall enough for restored drafts and media
...
The iframe height is synced explicitly, and two paths were missing it, so long
content ended up clipped inside the editor's own scroll area.
- restoring a local draft calls setContent with a whole article at once; the
iframe stayed at 520px while the body grew to 1410px, so only the first few
paragraphs appeared to survive the restore
- media inserts called insertContent directly without resyncing, and images
load asynchronously: the height was measured while the image was still 0px
tall, leaving the paragraphs below it cut off (measured: iframe 946 vs body
1006 with a single image after long text)
Fixes
- resync the height right after the restore's setContent, and add SetContent to
the events that already sync height and content
- resync after both media callbacks (picker and embed)
- add installHeightWatchers(): capture-phase load listener inside the iframe for
img / iframe / video / audio, plus a ResizeObserver on the body, so the height
follows assets that finish loading later
Tests cover the restore path and both media paths, including async loading.
2026-11-10 18:45:14 +08:00
..
2026-10-29 20:31:39 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:36:45 +08:00
2026-11-03 16:36:45 +08:00
2026-11-01 20:05:04 +08:00
2026-11-05 21:09:40 +08:00
2026-11-03 16:58:05 +08:00
2026-11-03 16:58:05 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-05 23:51:33 +08:00
2026-08-29 15:50:04 +08:00
2026-09-24 21:13:24 +08:00
2026-11-03 23:31:28 +08:00
2026-11-01 20:05:04 +08:00
2026-08-30 20:38:25 +08:00
2026-11-02 00:06:54 +08:00
2026-11-03 17:31:42 +08:00
2026-11-01 20:05:04 +08:00
2026-10-29 19:16:03 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-10 18:45:14 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-06 14:53:23 +08:00
2026-11-01 20:05:04 +08:00
2026-10-30 21:57:46 +08:00
2026-11-10 17:58:22 +08:00
2026-11-05 21:09:40 +08:00
2026-11-04 16:04:24 +08:00
2026-11-01 20:05:04 +08:00
2026-11-09 19:44:54 +08:00
2026-11-09 19:44:54 +08:00
2026-10-29 22:21:01 +08:00
2026-11-02 00:06:54 +08:00
2026-11-05 18:02:51 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-05 22:19:50 +08:00
2026-11-05 21:41:09 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-10-31 14:18:01 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-04 17:41:48 +08:00
2026-11-04 18:33:37 +08:00
2026-11-01 20:05:04 +08:00
2026-11-09 19:44:54 +08:00
2026-11-09 19:44:54 +08:00
2026-11-02 00:06:54 +08:00
2026-10-31 14:03:57 +08:00
2026-11-02 00:06:54 +08:00
2026-11-04 19:37:56 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-09 15:03:50 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-05 17:50:56 +08:00
2026-11-06 22:30:08 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-06 22:30:08 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-06 14:53:23 +08:00
2026-11-02 19:50:24 +08:00
2026-11-02 19:50:24 +08:00
2026-11-02 00:06:54 +08:00
2026-09-04 22:53:33 +08:00
2026-10-29 19:16:03 +08:00
2026-11-04 16:04:24 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:09:46 +08:00
2026-11-03 15:56:52 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 16:48:38 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-09 21:37:14 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-06 14:53:23 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-04 17:27:51 +08:00
2026-11-04 17:17:49 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 00:06:54 +08:00
2026-11-02 14:06:52 +08:00
2026-11-02 00:06:54 +08:00
2026-11-01 20:05:04 +08:00
2026-11-01 20:05:04 +08:00
2026-11-03 15:56:52 +08:00