Skip to content

Commit 12985f4

Browse files
committed
fix: disable auto shinking behavior
This is not oftenly used and can be confusing. See also #19#issuecomment-2702062656
1 parent 138289e commit 12985f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/popup.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ async function calcAlign(opt?: {
362362
const mlContent = popupContent
363363
.querySelector('math-field')
364364
?.shadowRoot?.querySelector('.ML__content') as HTMLElement | null | undefined
365-
// NOTE: 10 means don't expand until content exceed by 10, AND shrink at step of 10
366-
const widthToExpand = mlContent ? mlContent.scrollWidth - mlContent.offsetWidth - 10 : 0
365+
366+
const widthToExpand = mlContent ? mlContent.scrollWidth - mlContent.offsetWidth : 0
367+
367368
popup = {
368369
width: Math.max(popupDefaultWidth, popupContent.offsetWidth + widthToExpand),
369370
marginLeft: parseStyle(popupContent.style.marginLeft),

0 commit comments

Comments
 (0)