Good evening, I have been trying and trying again for days but I cannot in any way make the keyboard disappear or remove the focus from the ion-serch-bar.
This is my system information
Ionic:
Ionic CLI : 6.16.3 (/Users/gosumania/.nvm/versions/node/v14.11.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.3
@angular-devkit/build-angular : 0.1102.14
@angular-devkit/schematics : 11.2.6
@angular/cli : 11.2.6
@ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 2.4.7
@capacitor/android : 2.4.2
@capacitor/core : 2.4.7
@capacitor/ios : 2.4.9
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res : 0.15.3
native-run (update available: 1.4.0) : 1.3.0
System:
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v14.11.0 (/Users/gosumania/.nvm/versions/node/v14.11.0/bin/node)
npm : 7.8.0
OS : macOS Big Sur
Xcode : Xcode 12.5.1 Build version 12E507
This is the code I use:
import { Keyboard } from '@ionic-native/keyboard/ngx';
constructor(private keyboard: Keyboard){}
closeKeyboard() {
this.keyboard.hide()
}
I try on IOS device and on Android device.
On Xcode i have di warn :
[warn] - Native: tried calling Keyboard.hide, but the Keyboard plugin is not installed.
[warn] - Install the Keyboard plugin: 'ionic cordova plugin add cordova-plugin-ionic-keyboard’
I cannot upgrade to Capacitor 3.0 because I have too many errors if I try to do so.