Repository navigation
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
- Clicking between different inputs (opens the keyboard)
- keyboard.isOpen does not work, it detects the keyboard as closed when it is open
Reproduction video:
https://github.com/ionic-team/ionic-framework/assets/34127019/c7449a79-f040-47af-bae1-1612e7c22291
Expected Behavior
- Clicking between different inputs (opens the keyboard)
- keyboard.isOpen detects the actual state of the keyboard, regardless of the action that occurred previously
Steps to Reproduce
- Create a page with some ion-inputs
- Add const { isOpen } = useKeyboard() to the page
- Build for iOS
- Click between inputs and see that isOpen does not work as expected
Code Reproduction URL
Ionic Info
Ionic:
Ionic CLI : 7.0.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 7.0.5 (/Users/quentin/Code/app/node_modules/.pnpm/@Ionic[email protected]/node_modules/@ionic/vue)
Capacitor:
Capacitor CLI : 5.0.1
@capacitor/android : 5.0.1 (/Users/quentin/Code/app/node_modules/.pnpm/@capacitor+android@5.0.1_@capacitor[email protected]/node_modules/@capacitor/android)
@capacitor/core : 5.0.1 (/Users/quentin/Code/app/node_modules/.pnpm/@capacitor[email protected]/node_modules/@capacitor/core)
@capacitor/ios : 5.0.1 (/Users/quentin/Code/app/node_modules/.pnpm/@capacitor+ios@5.0.1_@capacitor[email protected]/node_modules/@capacitor/ios)
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v16.15.0 (/usr/local/bin/node)
npm : 8.5.5
OS : macOS Unknown
Additional Information
Reproduction video:
https://github.com/ionic-team/ionic-framework/assets/34127019/c7449a79-f040-47af-bae1-1612e7c22291
First part of the video:
I click between inputs, and isOpen see the keyboard as closed
Second part:
I click inside an input, then outside, several times, and isOpen works.
No response
Activity
[-]bug: keyboard.isOpen does not work when clicking between different inputs (Vuejs)[/-][+]bug: keyboard events listens on visual viewport when in capacitor/cordova[/+]liamdebeasi commentedon May 30, 2023
Thanks for the report. Here is a dev build with a proposed fix if you are interested in testing:
I see you are using
@nuxtjs/ionic, so you may need to override the child dependencies to get the dev build to install correctly.In your package.json:
ionitron-bot commentedon Jun 30, 2023
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
fix(keyboard): listen on correct events for keyboard lifecycle (ionic…