Skip to content

Commit

Permalink
fix: popup glitches caused by long calculations (#4511)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduard Aksamitov <e@euaaaio.ru>
  • Loading branch information
euaaaio authored Feb 5, 2024
1 parent d759608 commit 889f83f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/ui/src/components/PopupInstance.svelte
Original file line number Diff line number Diff line change
@@ -112,8 +112,8 @@
let oldModalHTML: HTMLElement | undefined = undefined
$: if (modalHTML !== undefined && oldModalHTML !== modalHTML) {
clientWidth = -1
clientHeight = -1
clientWidth = modalHTML.clientWidth
clientHeight = modalHTML.clientHeight
oldModalHTML = modalHTML
fitPopup(modalHTML, element, contentPanel)
showing = true
@@ -127,7 +127,9 @@
}
export function fitPopupInstance (): void {
if (modalHTML) fitPopup(modalHTML, element, contentPanel)
if (modalHTML) {
fitPopup(modalHTML, element, contentPanel)
}
}
$: if ($deviceInfo.docWidth <= 900 && !docSize) docSize = true

0 comments on commit 889f83f

Please sign in to comment.