Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Disable Popover GPU acceleration on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Bolender committed Jun 19, 2019
1 parent 8261734 commit d69f958
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion components/popover/popover-base.jsx
Expand Up @@ -74,6 +74,7 @@ export class PopoverBase extends Component {
theme: {
backgroundColor: colors.white,
},
modifiers: {},
styleOverrides: {},
};

Expand Down Expand Up @@ -143,10 +144,22 @@ export class PopoverBase extends Component {
} = this.props;
const { showPopper } = this.state;

const popperModifiers = {
...modifiers,
computeStyle: {
...modifiers.computeStyle,
gpuAcceleration: !(
typeof window !== `undefined` &&
window.devicePixelRatio < 1.5 &&
/Win/.test(navigator.platform)
),
},
};

const popover = (
<Popper
placement={popoverPlacement}
modifiers={modifiers}
modifiers={popperModifiers}
eventsEnabled={eventsEnabled}
positionFixed={positionFixed}
>
Expand Down

0 comments on commit d69f958

Please sign in to comment.