Skip to content

Commit a6c052d

Browse files
guidooswaldDBclaude
andcommitted
Fix side-panel resize drag blocked by iframe
Inject a full-screen transparent shield div on mousedown so mouse events are captured by the parent document even when the cursor moves over the JSON viewer iframe during dragging. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 575a5f4 commit a6c052d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

assets/devtools_patch.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@
163163
/* disable transition during drag so it tracks the mouse directly */
164164
panel.style.transition = 'none';
165165

166+
/* Cover the whole page (including the iframe) so mousemove is never
167+
swallowed by the iframe's own document while dragging. */
168+
var shield = document.createElement('div');
169+
shield.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:99999;cursor:col-resize;';
170+
document.body.appendChild(shield);
171+
166172
var startX = e.clientX;
167173
var startW = panel.offsetWidth;
168174

@@ -175,6 +181,7 @@
175181
handle.classList.remove('dragging');
176182
document.body.style.userSelect = '';
177183
panel.style.transition = '';
184+
document.body.removeChild(shield);
178185
var w = parseFloat(panel.style.width);
179186
if (w) localStorage.setItem(LS_KEY, w);
180187
document.removeEventListener('mousemove', onMove);

0 commit comments

Comments
 (0)