chore: take popover offset into account when fitting inside rect

This commit is contained in:
Aman Harwara
2023-07-10 14:29:49 +05:30
parent bb997312e8
commit e4488dcb8c
3 changed files with 12 additions and 5 deletions

View File

@@ -202,6 +202,9 @@ function TextFormatFloatingToolbar({
offset: 12,
maxHeightFunction: () => 'none',
})
if (calculatedStyles) {
toolbarElement.style.setProperty('--offset', calculatedStyles['--offset'])
}
if (calculatedStyles) {
Object.assign(toolbarElement.style, calculatedStyles)