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] Popper resets scroll position when `modifiers` prop is present

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Popper with a Select input inside resets its scroll position when selecting an option from the Select menu, only when the modifiers prop of the Popper component is present.

Expected behavior 🤔

Interacting with a Select options input inside a Popper should not, resets its scroll position even when the modifiers prop is present.

Steps to reproduce 🕹

Codesandbox

https://codesandbox.io/s/material-ui-popper-modifiers-issue-vq51sw?file=/src/Demo.js

Steps:

  1. Create a basic Popper without modifiers props, having a Select input inside
  2. Make sure the Popper is placed at a scrollable distance to see the bug.
  3. Open the Popper and interact with the Select options.
  4. After interaction with the Select, the scroll position doesn’t resets.
  5. Add the modifiers props. Even empty array should work.
  6. After interaction with the Select, the scroll position resets.

Context 🔦

Having form interactions inside Popper isn’t possible with this bug. The modifiers prop is essential for supporting arrow with the Popper.

Your environment 🌎

npx @mui/envinfo
 Chrome
 Version 103.0.5060.114 (Official Build) (x86_64)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
guilhermeabellcommented, Jul 29, 2022

I’m having the same issue with the Table Pagination popover.

1reaction
hbjORbjcommented, Jul 7, 2022

I can indeed reproduce the issue.

I will investigate and give you an update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you position Material UI Popper in the bottom right ...
I'm using Material UI v4.9.1. They have a Popper React component, based on Popper ...
Read more >
FAQ - Popper
Why is my popper jittering while scrolling? If your reference element is position: fixed , use the "fixed" strategy: createPopper(reference, popper ...
Read more >
Guidelines for teaching using ICT devices in a classroom
$['default'] : $; function _defineProperties(target, props) { for (var i = 0; ... Utils * @param {Object} position - CSS position the Popper...
Read more >
bootstrap.bundle.min.js.map - Google Git
node_modules/popper.js/dist/esm/popper.js",". ... you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction ...
Read more >
Top Popper.js Interview Questions and Answers
For example, offset relies on popperOffsets data, since it mutates its properties. In short, the modifier depends upon this list of modifiers' data...
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