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

Adding snapPoints breaks scrolling into view for inputs when keyboard opens #73

Open
ispyinternet opened this issue Apr 11, 2024 · 3 comments

Comments

@ispyinternet
Copy link

ispyinternet commented Apr 11, 2024

Describe the bug

when you add snapPoints (even just one), to the drawer , if you have a form, then when you open the keyboard, the focused input does not scroll into view.

I would also say that the scrolling action (when working) is very aggressive, i.e. it scrolls the content so much that the input in focus is hard aligned to the top of the drawer. Would it be possible to knock that back a notch!?

Reproduction

Stackblitz will not reproduce because you cannot open on a mobile

Logs

No response

System Info

System:
    OS: Linux 6.1 Amazon Linux 2023
    CPU: (4) x64 AMD EPYC 7571
    Memory: 5.47 GB / 15.45 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.19 - ~/.npm-global/bin/yarn
    npm: 8.15.1 - ~/.npm-global/bin/npm
    pnpm: 8.15.0 - ~/.local/share/pnpm/pnpm
  npmPackages:
    svelte: ^4.2.8 => 4.2.8 
    typescript: ^5.3.3 => 5.3.3

Observed both with chrome and safari on iPhone.

Severity

annoyance

@ispyinternet
Copy link
Author

It looks like there are a couple of related issues in the react version:

emilkowalski/vaul#321
emilkowalski/vaul#284

@vishaljak
Copy link

@ispyinternet were you able to find a workaround for this? I am facing a similar issue

@chanmathew
Copy link

Also running into this issue, when you have an input in the drawer it seems to break the snappoints and for some reason gets stuck at half height as soon as i focus the input, and the input scrolls to the top of the drawer. Has anyone found a workaround?

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

3 participants