Skip to content

Commit 0f89d75

Browse files
authored
fix(popover): Use absolute position and strategy (#1666)
This fix minimizes the amount of jitter when an open popover tries to reposition against its target while scrolling or resizing.
1 parent 96b6a03 commit 0f89d75

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/popover/popover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export default class IgcPopoverComponent extends LitElement {
276276
{
277277
placement: this.placement ?? 'bottom-start',
278278
middleware: this._createMiddleware(),
279-
strategy: 'fixed',
279+
strategy: 'absolute',
280280
}
281281
);
282282

src/components/popover/themes/light/popover.base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}
77

88
:popover-open {
9-
position: fixed;
9+
position: absolute;
1010
overflow: visible;
1111
isolation: isolate;
1212
height: fit-content;

0 commit comments

Comments
 (0)