From 285f89b5a901f3efed429903d90733865e3220ff Mon Sep 17 00:00:00 2001 From: fleonus Date: Thu, 31 Mar 2022 22:12:06 +0200 Subject: [PATCH] Allow overriding getReferenceClientRect in floating menu --- packages/extension-floating-menu/src/floating-menu-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/extension-floating-menu/src/floating-menu-plugin.ts b/packages/extension-floating-menu/src/floating-menu-plugin.ts index 4ab1b0b8..caffdffc 100644 --- a/packages/extension-floating-menu/src/floating-menu-plugin.ts +++ b/packages/extension-floating-menu/src/floating-menu-plugin.ts @@ -156,7 +156,7 @@ export class FloatingMenuView { } this.tippy?.setProps({ - getReferenceClientRect: () => posToDOMRect(view, from, to), + getReferenceClientRect: this.tippyOptions.getReferenceClientRect || () => posToDOMRect(view, from, to), }) this.show()