We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0a8b81 commit 0428f0aCopy full SHA for 0428f0a
1 file changed
packages/fluent-editor/src/modules/custom-image/blot-formatter.ts
@@ -130,8 +130,8 @@ export class BlotFormatter {
130
display: 'block',
131
left: `${specRect.left - parentRect.left - 1 + parent.scrollLeft}px`,
132
top: `${specRect.top - parentRect.top + parent.scrollTop}px`,
133
- width: `${specRect.width}px`,
134
- height: `${specRect.height}px`,
+ width: `${Math.min(specRect.width, parentRect.width)}px`,
+ height: `${Math.min(specRect.height, parentRect.height)}px`,
135
})
136
}
137
0 commit comments