Commit 2f2b2b9
fix(core): scope the table drag image to the view that owns it
Addresses review on #2920 (r-4981596549).
`dragImageElement` was module state, so the `destroy()` cleanup added in the
previous commit removed the drag image for *any* editor rather than the one
being destroyed. With more than one editor on a page - or a nested editor
inside a custom block - unmounting one would have cleared a preview that
another editor was still dragging. The cleanup introduced that; the module
scope predates it.
The element is now a private field on `TableHandlesView`, with `setDragImage`
and `unsetDragImage` methods owning its lifecycle, and `buildTableDragImage`
left as a pure builder.
Also replaces the deprecated `word-break: break-word` on the table rule. The
earlier suggestion of `overflow-wrap: break-word` was declined because it
changes the min-content contribution that table column sizing depends on;
`word-break: normal` + `overflow-wrap: anywhere` is what the deprecated value
is defined to mean, so it carries that effect and is an exact swap. The
drag-image width test covers the column sizing either way.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent b7d7147 commit 2f2b2b9
2 files changed
Lines changed: 36 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| |||
Lines changed: 32 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
| 81 | + | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
90 | | - | |
91 | 87 | | |
92 | 88 | | |
93 | 89 | | |
| |||
166 | 162 | | |
167 | 163 | | |
168 | 164 | | |
169 | | - | |
| 165 | + | |
170 | 166 | | |
171 | 167 | | |
172 | 168 | | |
| |||
190 | 186 | | |
191 | 187 | | |
192 | 188 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
| |||
250 | 241 | | |
251 | 242 | | |
252 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
253 | 248 | | |
254 | 249 | | |
255 | 250 | | |
| |||
719 | 714 | | |
720 | 715 | | |
721 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
722 | 740 | | |
723 | 741 | | |
724 | 742 | | |
725 | | - | |
| 743 | + | |
726 | 744 | | |
727 | 745 | | |
728 | 746 | | |
| |||
757 | 775 | | |
758 | 776 | | |
759 | 777 | | |
760 | | - | |
761 | | - | |
| 778 | + | |
762 | 779 | | |
763 | 780 | | |
764 | 781 | | |
| |||
1080 | 1097 | | |
1081 | 1098 | | |
1082 | 1099 | | |
1083 | | - | |
| 1100 | + | |
1084 | 1101 | | |
1085 | 1102 | | |
1086 | 1103 | | |
| |||
0 commit comments