From d69f958920d27b28114d09800f1b9b91a90aaf69 Mon Sep 17 00:00:00 2001 From: Robert Bolender Date: Wed, 19 Jun 2019 15:26:54 -0700 Subject: [PATCH] Disable Popover GPU acceleration on Windows. See also PR #28, twbs/bootstrap#22610. --- components/popover/popover-base.jsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/components/popover/popover-base.jsx b/components/popover/popover-base.jsx index fd7877a17..683f662cc 100644 --- a/components/popover/popover-base.jsx +++ b/components/popover/popover-base.jsx @@ -74,6 +74,7 @@ export class PopoverBase extends Component { theme: { backgroundColor: colors.white, }, + modifiers: {}, styleOverrides: {}, }; @@ -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 = (