Comments (4)
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.
Hi @filip-dot-cube and @YoFiq 👋🏻
Thanks for reporting this! I have a few follow-up questions:
- 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.
- 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.
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.
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)
- Sheet is not opening on mobile browsers
- Sheet is not reopening in desktop Chrome HOT 4
- Allow style with Tailwind with className prop HOT 2
- initialSnap -34px bug HOT 2
- How do I implement a sticky footer? HOT 1
- Customer Header breaks dragging behavior
- Stacking sheets HOT 1
- TypeError: undefined is not an object (evaluating 'scrollable.scrollTop') HOT 1
- prevent Closing component HOT 2
- Sheet not closing on mobile HOT 13
- Bug on Safari Mobile, when switching the address bar up
- Bug: page overflow when mobile on screen keyboard is active (chrome) HOT 1
- Break tree shaking issue because of a "motion" HOT 3
- Close the sheet, but the component remains mounted with opacity 0. HOT 1
- Drag functionality with Scroller HOT 1
- Project Still Maintained? HOT 1
- There is no renderBackdrop prop.
- Sheet is too slow at iPhone
- Everthing is working but getting some 31 warnings what are these warnings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-modal-sheet.