We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25b2e76 commit 8afc3f5Copy full SHA for 8afc3f5
packages/components/src/components/tooltip/tooltip.lite.tsx
@@ -52,8 +52,16 @@ export default function DBTooltip(props: DBTooltipProps) {
52
return parent;
53
},
54
handleAutoPlacement: (parent?: HTMLElement) => {
55
- if (!parent) return;
56
- if (_ref) {
+ if (!parent || !_ref) return;
+
57
+ // Check if CSS Anchor Positioning API is supported
58
+ const supportsAnchorPositioning =
59
+ typeof window !== 'undefined' &&
60
+ CSS.supports('anchor-name', '--anchor') &&
61
+ CSS.supports('position-anchor', '--anchor');
62
63
+ // Fallback to existing JavaScript implementation
64
+ if (!supportsAnchorPositioning) {
65
// This is a workaround for angular
66
utilsDelay(() => {
67
handleFixedPopover(
0 commit comments