Test
bcfd37d481
fix: CodeMirror cursor placement at non-100% zoom levels
...
Root cause: CSS zoom on document.documentElement caused stale CodeMirror
measurements. Two issues:
1. Race condition: zoom was applied in useEffect (parent), but CodeMirror
was created in useEffect (child) — child effects run first, so CM
measured at zoom=1 before zoom was actually applied.
2. No re-measure on zoom change: CSS zoom changes don't trigger
ResizeObserver on descendant elements, so CodeMirror never updated
its cached scaleX/scaleY, line heights, or character widths.
Fix:
- Apply zoom synchronously during useState init (before child effects)
- Dispatch 'laputa-zoom-change' event when zoom changes
- Listen for this event in useCodeMirror and call view.requestMeasure()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-08 14:54:50 +01:00
..
2026-02-22 12:02:19 +01:00
2026-02-22 10:11:52 +01:00
2026-03-04 10:05:43 +01:00
2026-03-04 10:05:43 +01:00
2026-03-07 14:19:41 +01:00
2026-03-07 14:19:41 +01:00
2026-03-08 13:06:58 +01:00
2026-03-08 13:06:58 +01:00
2026-03-07 12:39:55 +01:00
2026-03-02 05:00:29 +01:00
2026-03-02 21:02:54 +01:00
2026-03-07 01:14:12 +01:00
2026-03-07 01:14:12 +01:00
2026-03-02 01:50:41 +01:00
2026-03-02 01:50:41 +01:00
2026-03-08 14:54:50 +01:00
2026-03-08 14:54:50 +01:00
2026-03-07 11:58:46 +01:00
2026-03-07 12:39:55 +01:00
2026-02-23 23:08:09 +01:00
2026-02-24 12:46:19 +01:00
2026-03-03 02:45:42 +01:00
2026-03-03 02:45:42 +01:00
2026-03-03 02:45:42 +01:00
2026-02-27 15:27:25 +01:00
2026-02-27 15:27:25 +01:00
2026-02-25 21:43:16 +01:00
2026-02-27 14:27:43 +00:00
2026-03-02 21:27:26 +01:00
2026-03-02 21:27:26 +01:00
2026-02-24 23:15:37 +01:00
2026-02-27 18:23:28 +01:00
2026-03-03 07:10:34 +01:00
2026-03-02 01:50:06 +01:00
2026-03-02 01:50:06 +01:00
2026-03-07 11:06:10 +01:00
2026-03-07 11:06:10 +01:00
2026-02-25 13:31:19 +01:00
2026-02-28 10:59:05 +01:00
2026-02-28 12:43:18 +01:00
2026-02-28 21:31:47 +01:00
2026-02-28 21:31:47 +01:00
2026-03-07 01:14:12 +01:00
2026-03-07 01:14:12 +01:00
2026-03-03 12:18:40 +01:00
2026-02-22 14:06:51 +01:00
2026-02-22 14:10:42 +01:00
2026-03-07 11:33:18 +01:00
2026-03-07 11:33:18 +01:00
2026-03-07 01:14:12 +01:00
2026-03-07 12:39:55 +01:00
2026-02-27 16:53:18 +01:00
2026-03-03 07:10:34 +01:00
2026-03-02 11:00:41 +01:00
2026-02-25 18:39:12 +00:00
2026-03-07 00:20:51 +01:00
2026-03-07 00:20:51 +01:00
2026-03-03 12:18:40 +01:00
2026-03-01 19:32:15 +01:00
2026-02-28 20:08:55 +01:00
2026-03-05 15:26:21 +01:00
2026-03-03 00:59:09 +01:00
2026-03-03 00:59:09 +01:00
2026-03-05 07:11:33 +01:00
2026-03-02 18:44:47 +01:00
2026-03-02 18:44:47 +01:00
2026-02-23 19:53:36 +01:00
2026-02-23 19:53:36 +01:00
2026-02-26 00:55:16 +00:00
2026-02-26 00:55:16 +00:00
2026-03-03 19:51:49 +01:00
2026-02-25 00:01:52 +01:00
2026-02-16 08:04:06 +01:00
2026-03-06 08:43:54 +01:00
2026-03-05 14:42:28 +01:00
2026-03-05 15:26:21 +01:00
2026-03-02 23:53:37 +01:00
2026-03-02 23:53:37 +01:00
2026-03-05 15:26:21 +01:00
2026-03-07 00:31:46 +01:00
2026-03-07 00:31:46 +01:00
2026-03-03 02:36:33 +01:00
2026-03-03 02:36:33 +01:00
2026-03-06 21:41:00 +01:00
2026-03-05 15:26:21 +01:00
2026-03-08 14:54:50 +01:00
2026-03-08 14:54:50 +01:00