Colour pick mode: header/footer zone previews (pointer-events:none) are now pickable
Found by the real-editor e2e: picking over the header or its logo box returned the page colour behind it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba5611c3e3
commit
501f276746
2 files changed
+9
-1
No files matched your search
@@ -153,7 +153,9 @@ export function pickFromCanvas(opts: { frameSelector?: string; design: SiteDesig
|
||||
return new Promise<CanvasPickResult>((resolve) => {
|
||||
const style = document.createElement('style');
|
||||
style.setAttribute('data-wsb-pick', 'style');
|
||||
style.textContent = `${selector},${selector} *{cursor:crosshair !important}`;
|
||||
// The header/footer zone previews are pointer-events:none in the editor (so they never take clicks); while
|
||||
// picking they must be hit-testable, or the header and its logo box could never be picked.
|
||||
style.textContent = `${selector},${selector} *{cursor:crosshair !important}${selector} [data-zone-preview],${selector} [data-zone-preview] *{pointer-events:auto !important}`;
|
||||
const outline = document.createElement('div');
|
||||
outline.setAttribute('data-wsb-pick', 'outline');
|
||||
outline.style.cssText = 'position:fixed;pointer-events:none;z-index:2147483646;outline:2px solid #fff;box-shadow:0 0 0 2px #1d4ed8;display:none';
|
||||
|
||||
Reference in new issue
Block a user