question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Popper.js messing up dropdown styles

See original GitHub issue

Loving the new popper.js but was wondering if there was a way to disable the custom styles it auto adds to elements?

Its adding the following:

    position: absolute;
    transform: translate3d(0px, 0px, 0px);
    top: 0px;
    left: 0px;
    will-change: transform;

This in turn overrides some custom animations I am trying to implement, it also messes up alignment if I wanted to put dropddowns in a container. The plugin is great but there must be a way to disable this custom “hardcode” style feature?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:21
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

23reactions
klasjersevicommented, Aug 24, 2017

You can just turn off the transform placement on Popper to make it only use top/left for positioning instead. Then you can use transform for any animations/transitions as you wish.

Popper.Defaults.modifiers.computeStyle.gpuAcceleration = false;
21reactions
logolevelcommented, Oct 23, 2017

my dropdown list was flying all over the document), the problem solved only by turning off the computeStyle

Popper.Defaults.modifiers.computeStyle.enabled = false;
Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable auto placement caused by popper.js - Stack Overflow
I'm working with Bootstrap 4 dropdown and there are about 18 dropdown items. Because the height is too much, popper.js automatically moves ...
Read more >
Using usePopper and styled-components to create a practical ...
Backstory. So my team and I are trying to create our own reusable UI component library that's not based on any UI frameworks...
Read more >
Popper (v2.×)
Clipping and overflow issues: Pure CSS poppers will not be prevented from overflowing clipping boundaries, such as the viewport. It will get partially...
Read more >
Introduction - Bootstrap
Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with jsDelivr and a template starter page.
Read more >
Bootstrap Dropdowns -- Tutorials with advanced examples
Be sure to include popper.min.js before Bootstrap's JavaScript or use bootstrap.bundle.min.js / bootstrap.bundle.js which contains Popper. Popper ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found