Commit 0a255ab
fix: Prevent edit modal opening on grid block resize and re-render after layout change
Two fixes for block grid resize interactions:
1. Drag detection: Track pointerdown position on the preview <a> tag
and compare with click position. If the pointer moved >5px or no
pointerdown was recorded (resize drag ended over the element),
suppress navigation. Keyboard activation is unaffected.
2. Re-render on resize: Detect columnSpan/rowSpan changes in the
entry context observer and trigger a debounced (300ms) re-render
with updated layout data, so the server-rendered preview reflects
the new dimensions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent df4cc6d commit 0a255ab
4 files changed
Lines changed: 475 additions & 402 deletions
File tree
- src
- Umbraco.Community.BlockPreview.UI/src/blockEditor
- Umbraco.Community.BlockPreview/wwwroot/App_Plugins/Umbraco.Community.BlockPreview
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
122 | 140 | | |
123 | 141 | | |
| 142 | + | |
124 | 143 | | |
125 | 144 | | |
126 | 145 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
261 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
262 | 292 | | |
263 | 293 | | |
264 | 294 | | |
| |||
309 | 339 | | |
310 | 340 | | |
311 | 341 | | |
| 342 | + | |
312 | 343 | | |
313 | 344 | | |
314 | 345 | | |
| |||
0 commit comments