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

Iphone Keyboard Issue when we have input in content #135

Closed
charanjit-singh opened this issue Aug 28, 2023 · 4 comments · Fixed by #138
Closed

Iphone Keyboard Issue when we have input in content #135

charanjit-singh opened this issue Aug 28, 2023 · 4 comments · Fixed by #138

Comments

@charanjit-singh
Copy link

charanjit-singh commented Aug 28, 2023

https://codesandbox.io/s/competent-joana-7cxmh6?file=/src/App.js

Open this in iPhone and try to fill in the input field. Keyboard covers the input box instead of pushing it.

import Sheet from "react-modal-sheet";
import { useState } from "react";

function Example() {
  const [isOpen, setOpen] = useState(false);

  return (
    <>
      <button onClick={() => setOpen(true)}>Open sheet</button>

      <Sheet
        detent="content-height"
        isOpen={isOpen}
        onClose={() => setOpen(false)}
      >
        <Sheet.Container>
          <Sheet.Header />
          <Sheet.Content>
            <input
              style={{
                width: "100%",
                fontSize: 18
              }}
            />
          </Sheet.Content>
        </Sheet.Container>
        <Sheet.Backdrop />
      </Sheet>
    </>
  );
}

export default Example;
screenRecording-28-8-2023-16-58.mp4
@charanjit-singh
Copy link
Author

@eimerreis
Copy link
Contributor

We are facing the same issue and it's kind of a show stopper to continue using react-modal-sheet 😢

@mghdmi
Copy link

mghdmi commented Oct 7, 2023

same issue

@eimerreis
Copy link
Contributor

FYI: You can use the disableScrollLocking prop now and set it to true to fix this issue.

The downside is that you will have to take care of scroll-locking yourself then. See https://github.com/Temzasse/react-modal-sheet#props

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

Successfully merging a pull request may close this issue.

3 participants