Skip to content

Commit 41b11af

Browse files
committed
fix: address bug causing viewport width to progressively decrease in size when resizing your screen / refreshing on certain devices
1 parent da3c5f1 commit 41b11af

File tree

1 file changed

+2
-2
lines changed
  • packages/uikit-workshop/src/scripts/lit-components/pl-viewport

1 file changed

+2
-2
lines changed

packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class IFrame extends BaseLitComponent {
224224
}
225225

226226
handleResize() {
227-
this.updateSizeReading(this.iframe.clientWidth);
227+
this.updateSizeReading(this.iframeContainer.clientWidth);
228228
}
229229

230230
// Update Pixel and Em inputs
@@ -414,7 +414,7 @@ class IFrame extends BaseLitComponent {
414414
const self = this;
415415
self.querySelector('.pl-js-resize-handle').classList.add('is-resizing');
416416
const origClientX = event.clientX;
417-
const origViewportWidth = this.iframe.clientWidth + 40;
417+
const origViewportWidth = this.iframeContainer.clientWidth;
418418

419419
this.fullMode = false;
420420

0 commit comments

Comments
 (0)