Commit 08ffc41
Decoration range incorrectly expands to run boundaries; highlight can be lost after mark changes (#2173)
* fix: separate logic for decoration sync in presentation editor
* fix: move from overlay approach to paragraph splitting
* fix: clear selection
* fix: prevent highlighted decoration position shift
* fix: remove console.log
* fix: decoration restore condition
* fix(super-editor): compose decoration remap so external highlights track replacement and mark split
* fix: logic improvements
* fix: create shared helper for repeated code
* fix: update tests and address comments
* test: add behavior tests for decoration survival after mark changes
Playwright tests covering SD-1963: comment highlights and track-change
decorations must persist when the user applies bold/italic/underline to
overlapping or partially-overlapping text.
* fix(test): check comment highlight by id after run split
When italic is applied to part of a commented range, the run splits
and the highlight spans multiple DOM elements. Assert by commentId
and individual text fragments instead of the full contiguous text.
---------
Co-authored-by: Matthew Connelly <matthew@harbourshare.com>
Co-authored-by: Nick Bernal <nick@superdoc.dev>
Co-authored-by: Caio Pizzol <caio@harbourshare.com>1 parent 2452c37 commit 08ffc41
10 files changed
Lines changed: 1502 additions & 27 deletions
File tree
- packages
- layout-engine/layout-bridge/src
- super-editor/src
- core/presentation-editor
- dom
- layout
- extensions/custom-selection
- superdoc/src/dev/components
- tests/behavior/tests/formatting
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
387 | 386 | | |
388 | 387 | | |
389 | 388 | | |
| |||
Lines changed: 43 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
2341 | 2342 | | |
2342 | 2343 | | |
2343 | 2344 | | |
2344 | | - | |
2345 | | - | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
2346 | 2349 | | |
2347 | 2350 | | |
2348 | 2351 | | |
| |||
2354 | 2357 | | |
2355 | 2358 | | |
2356 | 2359 | | |
2357 | | - | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
2358 | 2363 | | |
2359 | 2364 | | |
2360 | 2365 | | |
| |||
2463 | 2468 | | |
2464 | 2469 | | |
2465 | 2470 | | |
2466 | | - | |
2467 | | - | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
2468 | 2495 | | |
2469 | 2496 | | |
2470 | 2497 | | |
| |||
3160 | 3187 | | |
3161 | 3188 | | |
3162 | 3189 | | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
3163 | 3201 | | |
3164 | 3202 | | |
3165 | 3203 | | |
| |||
0 commit comments