Comments (2)
Hello @drakedeatonuk thanks for this feature request!
I can see you have also experienced the pain that is trying to animate any content relative to the keyboard position! Based on the current state of technology, this is difficult for anyone to do perfectly in all environments. Devices are notoriously inconsistent with the rendered keyboard height.
We have to use a mixed strategy of starting an animation when the keyboard show event is dispatched and doing a best guess to the animation duration & curve when animating to a fixed position relative to the keyboard height. Almost every implementation I've seen that has tried this either animates their custom content a little off from the keyboard or they wait until the keyboard has fully appeared before revealing an accessory bar.
I will discuss with the team and see if we have opinions on how to best handle this. Due to the limitation of how well we can also do this out of the box, potentially documentation and/or a blog may be better suited so developers can customize the implementation to match their device demographics best.
from ionic-framework.
@sean-perkins I feel like there should be a support group from people who've gone down the custom mobile keyboard content animate rabbit hole!
A blog or a page of documentation on best practices/ different approaches would be very valuable I think. I know long I spent looking for resources and not quite ever finding the help I wanted.
Perhaps some examples of approaches to try could be included too. Recently I've been toying with animating a transform: translateY
on a keyboardWillShow
event with the keyboardResize mode set to Native
- that's been quite a smooth looking transition although there's still some edge cases I need to work out.
There are truly some serious "gotchyas" when it comes to keyboard events too. For example, when a keyboard with auto-fill suggestions at it's top opens, ios actually sends two onWillShow and onDidShow events. This in particular created some headaches for creating animations as it makes it much harder to figure out if keyboard events were, from the users perspective, related to a keyboard appearing, or changing height.
Recently I've been gathering some measurements from ever ios devices as it seems that keyboard heights are always consistently off by a certain amount:
Can I ask, have you guys ever had any luck with this type of approach?
from ionic-framework.
Related Issues (20)
- feat: Ability to reorder horizontally in `ion-reorder ` HOT 3
- Ionic 7 Angular Standalone Component (Sidebar Menu Toggle not working in android device) HOT 2
- bug: IonInput has no placeholder text when type="time" HOT 4
- bug: Alert button handlers are executed outside the angular zone in certain cases HOT 3
- bug: input blurring utility causes non input and textarea elements to be blurred HOT 3
- bug: IonAert button get empty value from input HOT 4
- bug: ion-textarea Text Selection Not Persisting on Safari HOT 4
- bug: ion-toggle focus-visible doesnt work HOT 4
- IOS 17.4 will stop supporting PWA for Europe HOT 1
- feat: Webhook test - ignore HOT 1
- bug: item-sliding animation jumps when using multi touch HOT 1
- bug: ion-infinite-scroll can't be re-enabled after updating to Ionic 7 HOT 2
- bug: iOS Tablet: ion-tab-bar Remains Hidden After Keyboard Dismissal Following Device Orientation Change HOT 2
- bug:tabbar show wrong actived tab when click tab fast HOT 2
- bug: ion-datetime does not correctly show time inside the picker with a field that has a default date HOT 2
- bug: ion-datetime not accepting initial values across months when using with multiple option HOT 2
- bug: I need a double click to display a string in console.log using Ionic + React HOT 3
- feat: Helper & Error Text slot support in inputs HOT 9
- bug: Error from IonReactRouter when upgrading to v7 HOT 4
- bug: An error occurred while running subprocess npm. ( npm i exited with exit code 1 ). HOT 4
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 ionic-framework.