Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong positioning for menu component when using portal #3499

Closed
iJoyCode opened this issue Apr 3, 2019 · 5 comments
Closed

Wrong positioning for menu component when using portal #3499

iJoyCode opened this issue Apr 3, 2019 · 5 comments

Comments

@iJoyCode
Copy link

iJoyCode commented Apr 3, 2019

Hello, I've got strange positioning behavior from react-select with portal. Looks like it recalculate menu position only when something changes in Menu inner components.

Here is a example of problem:
Image

It's can be reproduced only when you use portal for Menu component. Can I use any workaround for this situation?

@Bosn
Copy link

Bosn commented Apr 12, 2019

Similar problem here, when clicked blank area in mobile WeChat browser, will cause touch the incorrect position on page. When I touch the blank area in input, the radio control selected value changed... really weird.

@Rall3n
Copy link
Collaborator

Rall3n commented Apr 12, 2019

It is not an error with this library, but a problem with React itself. React calls render before it updates the DOM, so the values for dimensions and positions you get in a render function might be outdated.

@chulanovskyi
Copy link

chulanovskyi commented Jul 15, 2019

have you tried to use latest useLayoutEffect hook? Seems likes it's a perfect case for start using it :)
Of course this message is addressed to the core 'react-select' team

@bladey
Copy link
Contributor

bladey commented May 28, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you!

@bladey bladey closed this as completed May 28, 2020
@iJoyCode
Copy link
Author

iJoyCode commented Feb 1, 2021

Issue is still reproducible in the last version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants