[Popover] Positioning delayed
See original GitHub issueProblem description
Popover component renders children before applying position styling. This results in a ‘flash’ of the popover in the top left corner (x: 0, y:0
) before positioning correctly. This is caused by the setPlacement
function being wrapped in setTimeout
. Removing the setTimeout wrapper resolves the issue. The timeout was added for this issue: #7663.
Initial render ‘flash’:
Split second later, correctly positioned:
Versions
- Material-UI: 0.19.0
- React: 15.5
- Browser: Chrome 60.0.3112.90
Issue Analytics
- State:
- Created 6 years ago
- Reactions:23
- Comments:41 (10 by maintainers)
Top Results From Across the Web
[Popover] Positioning delayed #8040 - mui/material-ui - GitHub
Popover blinks for some few visible frames (1000ms/24) on top-left corner of screen and then shows up in correct place without transition.
Read more >Popover delay at bootstrap doesnt work - Stack Overflow
To hide the popover automatically, after a certain time, you must use the timeout approach above. Show / hide only define the "effect",...
Read more >Popovers - Bootstrap
Popovers rely on the 3rd party library Popper.js for positioning. ... Delay showing and hiding the popover (ms) - does not apply to...
Read more >Popover | DotVVM Documentation
The Delay property is used to delay showing and hiding of the popover (value represents number of milliseconds). The Container property specifies the...
Read more >Bootstrap Popovers - examples & tutorial
Popovers rely on the 3rd party library Popper.js for positioning. ... Delay showing and hiding the popover (ms) - does not apply to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Update: I was able to minimize the initial re-position animation by wrapping whatever is inside the Popover component with a Menu component, then it seems to open/close properly (it’ll still show a flash from time to time, but significantly less than the above):
Any update with this one?