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

Modal window jumping on mobile when using selects (iOS only) #7012

Open
1 of 2 tasks
rip32700 opened this issue Oct 22, 2024 · 1 comment
Open
1 of 2 tasks

Modal window jumping on mobile when using selects (iOS only) #7012

rip32700 opened this issue Oct 22, 2024 · 1 comment
Labels
help wanted Contributions from community are welcome

Comments

@rip32700
Copy link

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.13.2

What package has an issue?

@mantine/core

What framework do you use?

Next.js

In which browsers you can reproduce the issue?

Safari

Describe the bug

On Safari in iOS (simulator or real device), when clicking into a select that's rendered in a modal window, it inititally jumps, then stops after a couple clicks. See video

jumping_bug.mov

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added Fix Unknown It is not clear whether the can be resolved help wanted Contributions from community are welcome and removed Fix Unknown It is not clear whether the can be resolved labels Oct 22, 2024
@rip32700 rip32700 changed the title Modal window jumping on mobile when using selects Modal window jumping on mobile when using selects (iOS only) Oct 22, 2024
@minosss
Copy link
Contributor

minosss commented Nov 13, 2024

After testing, I think this is an old issue in iOS.

To reproduce this issue, the body element scrolling and switching focus input (Select or Text Input) in the modal are required. The focus changed, and the body scrolled up.

Set the width and height in mobile device

html, body {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
}

Or scroll in custom element.

<body>
  <MantineProvider>
     <main class="fixed-full-screen-and-scrollable">
       {children}
     </main>
  </MantineProvider>
</body>

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions from community are welcome
Projects
None yet
Development

No branches or pull requests

3 participants