GithubHelp home page GithubHelp logo

Comments (4)

YoFiq avatar YoFiq commented on June 20, 2024

in my case i cannot type in input when detent={'content-height'}

Screen.Recording.2024-04-23.at.20.31.04.mov

from react-modal-sheet.

Temzasse avatar Temzasse commented on June 20, 2024

Hi @filip-dot-cube and @YoFiq 👋🏻

Thanks for reporting this! I have a few follow-up questions:

  1. What would be the expected behaviour when you first focus the input and then start dragging it?

The fact that the input caret stays in place seems like a native browser behaviour instead of a "bug" in the library. One idea that comes to my mind is that the focus could be moved to the sheet component upon drag start which would blur the input and probably fix the ghost caret issue.

  1. Could you utilise snap points for moving the sheet up when the input is focused?

I'm hesitant to add any automatic behaviour to the sheet regarding inputs and I believe you could already ensure that the input is not behind the keyboard by snapping the sheet to a higher position via input onFocus event handler (and then snap back to lower position with onBlur)

from react-modal-sheet.

Temzasse avatar Temzasse commented on June 20, 2024

Hi again!

I have added a fix for the ghost caret issue to the version v3.1.0. The fix is basically just blurring the input when dragging gesture starts.

About the keyboard issue: this library doesn't provide a built-in solution for handling the virtual keyboard on mobile, but I've added a section to the docs about virtual keyboard avoidance.

Hopefully that helps! 😎

from react-modal-sheet.

filip-dot-cube avatar filip-dot-cube commented on June 20, 2024

Hello @Temzasse thanks for your response. I have not yet tried the new version however by checking out the commit i have a feeling that while it kinda fixes the issue, it brings a new one. It will hide the keyboard which means potentionally unwanted flicker for the user.

Not sure how to deal with this, but some developers might want to at least disable this feature since in some cases this can be even worse than the ghost caret itself.

What do you think?

from react-modal-sheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.