Skip to content

Commit 0428f0a

Browse files
authored
feat: resolve the issue of the image toolbar border exceeding the limit after clicking on the image (#458)
1 parent f0a8b81 commit 0428f0a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/fluent-editor/src/modules/custom-image/blot-formatter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ export class BlotFormatter {
130130
display: 'block',
131131
left: `${specRect.left - parentRect.left - 1 + parent.scrollLeft}px`,
132132
top: `${specRect.top - parentRect.top + parent.scrollTop}px`,
133-
width: `${specRect.width}px`,
134-
height: `${specRect.height}px`,
133+
width: `${Math.min(specRect.width, parentRect.width)}px`,
134+
height: `${Math.min(specRect.height, parentRect.height)}px`,
135135
})
136136
}
137137

0 commit comments

Comments
 (0)