SegmentedControl's value is shifted to the left after opening it in a Modal
See original GitHub issueWhat package has an issue
Describe the bug
Create a Modal with a SegmentedControl inside of it, and store the SegmentedControl’s value with useState
. Click the SegmentedControl to change it’s value. Close the modal, and open it again. Now the displayed handle is shifted to the left by a bit (I’m not sure if it’s called a “handle”, but this is what I mean).
In this picture I have “Value 4” selected:
Here’s a video where I show the steps to reproduce the bug:
In which browser did the problem occur
Firefox, Chrome, Edge
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/priceless-bassi-yozl1
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Segmented controls - Human Interface Guidelines - Design
A segmented control is a linear set of two or more segments, ... Segments become selected when focus moves to them, not when...
Read more >Bootstrap 3 modal fires and causes page to shift to the left ...
You'll notice when the modal window opens, the browser scroll bar just disappears for a split second, then comes back. It does the...
Read more >UISegmentedControl Programmatically (EASY) - YouTube
Segmented Control iOS - UISegmentedControl ProgrammaticallyWhat are segmented controls ? How can you use segmented control in ios?
Read more >ion-segment: API Documentation for Segmented Controls
Segments consist of segment buttons with a value property on each button. Set the value property on the segment to match the value...
Read more >Popups: 10 Problematic Trends and Alternatives
Whether modal or not, most overlays appear at the wrong time, interrupt users during critical tasks, use poor language, and contribute 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
Thanks for debugging, resize observer must be getting confused by transforms, we’ll see how to make it work. @achmurali you were interested in the root cause of this issue
@Eldemarkki thanks for investigation, it helped a lot!