Merge pull request #2668 from fleon/patch-1
fix: Allow tippyOptions.getReferenceClientRect in bubble menu to be overridden
This commit is contained in:
@@ -180,7 +180,7 @@ export class BubbleMenuView {
|
||||
}
|
||||
|
||||
this.tippy?.setProps({
|
||||
getReferenceClientRect: () => {
|
||||
getReferenceClientRect: this.tippyOptions?.getReferenceClientRect || (() => {
|
||||
if (isNodeSelection(state.selection)) {
|
||||
const node = view.nodeDOM(from) as HTMLElement
|
||||
|
||||
@@ -190,7 +190,7 @@ export class BubbleMenuView {
|
||||
}
|
||||
|
||||
return posToDOMRect(view, from, to)
|
||||
},
|
||||
}),
|
||||
})
|
||||
|
||||
this.show()
|
||||
|
||||
Reference in New Issue
Block a user