Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ui/src/widgets/cursor_tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export class CursorTooltip implements m.ClassComponent<CursorTooltipAttrs> {
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: [
{
Expand Down
3 changes: 3 additions & 0 deletions ui/src/widgets/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ export class Popup implements m.ClassComponent<PopupAttrs> {
};

const options: Partial<OptionsGeneric<ExtendedModifiers>> = {
// 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
Expand Down
2 changes: 2 additions & 0 deletions ui/src/widgets/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ export class Tooltip implements m.ClassComponent<TooltipAttrs> {
} = attrs;

const options: Partial<OptionsGeneric<ExtendedModifiers>> = {
// As for popups, escape ancestors that clip overflow
strategy: 'fixed',
placement: position,
modifiers: [
{
Expand Down
Loading