Skip to content

Commit c672a10

Browse files
committed
fix: ruler lines causing live preview to overflow
1 parent e03591c commit c672a10

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,6 +3479,16 @@ function RemoteFunctions(config = {}) {
34793479
this.container = window.document.createElement("div");
34803480
this.container.setAttribute(GLOBALS.PHCODE_INTERNAL_ATTR, "true");
34813481

3482+
// Prevent ruler lines from extending document scroll area
3483+
// set container to match current document dimensions with overflow clip
3484+
this.container.style.position = "absolute";
3485+
this.container.style.top = "0";
3486+
this.container.style.left = "0";
3487+
this.container.style.width = document.documentElement.scrollWidth + "px";
3488+
this.container.style.height = document.documentElement.scrollHeight + "px";
3489+
this.container.style.overflow = "clip";
3490+
this.container.style.pointerEvents = "none";
3491+
34823492
const shadow = this.container.attachShadow({ mode: "open" });
34833493
this._shadow = shadow;
34843494

0 commit comments

Comments
 (0)