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.

SegmentedControl's value is shifted to the left after opening it in a Modal

See original GitHub issue

What package has an issue

@mantine/core

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:

https://user-images.githubusercontent.com/38920928/147412465-305fca23-9b90-4e0a-9a73-98dfb1e7df1c.mp4

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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rtivitalcommented, Jan 5, 2022

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

0reactions
rtivitalcommented, Jan 7, 2022

@Eldemarkki thanks for investigation, it helped a lot!

Read more comments on GitHub >

github_iconTop 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 >

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