]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
add suggested fix for gpu acceleration
authorJohann-S <johann.servoire@gmail.com>
Thu, 24 Sep 2020 08:18:24 +0000 (11:18 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 24 Sep 2020 12:06:30 +0000 (15:06 +0300)
site/docs/4.5/components/popovers.md

index c92a21c1913fd2b039458de3c2f5b2d07beefc9e..5b54d1c824eedc70ecef50a82f92018be1410a40 100644 (file)
@@ -139,7 +139,13 @@ Enable popovers via JavaScript:
 {% capture callout %}
 ##### GPU acceleration
 
-Popovers sometimes appear blurry on Windows 10 devices due to GPU acceleration and a modified system DPI. The workaround for this in v4 is to disable GPU acceleration as needed on your popovers. [See this issue for details and a suggested fix](https://github.com/twbs/bootstrap/issues/22610).
+Popovers sometimes appear blurry on Windows 10 devices due to GPU acceleration and a modified system DPI. The workaround for this in v4 is to disable GPU acceleration as needed on your popovers.
+
+Suggested fix:
+
+{% highlight js %}
+Popper.Defaults.modifiers.computeStyle.gpuAcceleration = !(window.devicePixelRatio < 1.5 && /Win/.test(navigator.platform))
+{% endhighlight %}
 {% endcapture %}
 {% include callout.html content=callout type="warning" %}