diff --git a/ui/src/widgets/cursor_tooltip.ts b/ui/src/widgets/cursor_tooltip.ts index 5fc6c797e41..1238bc095fc 100644 --- a/ui/src/widgets/cursor_tooltip.ts +++ b/ui/src/widgets/cursor_tooltip.ts @@ -74,6 +74,8 @@ export class CursorTooltip implements m.ClassComponent { onContentMount: (portal) => { this.virtualElement.setPosition(globalMousePos); this.popper = createPopper(this.virtualElement, portal, { + // As for popups, escape ancestors that clip overflow + strategy: 'fixed', placement: 'right', modifiers: [ { diff --git a/ui/src/widgets/popup.ts b/ui/src/widgets/popup.ts index 52a76351aae..a5f2d3c49e6 100644 --- a/ui/src/widgets/popup.ts +++ b/ui/src/widgets/popup.ts @@ -422,6 +422,9 @@ export class Popup implements m.ClassComponent { }; const options: Partial> = { + // Fixed positioning escapes ancestors that clip overflow, such as a host + // page's panels when the UI is embedded, and keeps the popup in the viewport + strategy: 'fixed', placement: position, modifiers: [ // Move the popup away from the target allowing room for the arrow diff --git a/ui/src/widgets/tooltip.ts b/ui/src/widgets/tooltip.ts index 226e27586b6..98eb0c7454b 100644 --- a/ui/src/widgets/tooltip.ts +++ b/ui/src/widgets/tooltip.ts @@ -182,6 +182,8 @@ export class Tooltip implements m.ClassComponent { } = attrs; const options: Partial> = { + // As for popups, escape ancestors that clip overflow + strategy: 'fixed', placement: position, modifiers: [ {