Giter Club home page Giter Club logo

cordova-plugin-ionic-keyboard's Introduction

cordova-plugin-ionic-keyboard

This plugin has been designed to work seamlessly with cordova-plugin-ionic-webview, so make sure you have it installed first:

Installation

cordova plugin add cordova-plugin-ionic-keyboard --save

Preferences

KeyboardResize (for iOS only)

Boolean (true by default)

Possible values

  • true: Showing/hiding the keyboard will trigger some kind of resizing of the app (see KeyboardResizeMode)
  • false: Web will not be resized when the keyboard shows up.
<preference name="KeyboardResize" value="true" />

KeyboardResizeMode (for iOS only)

String ('native' by default)

Possible values

  • native: The whole native webview will be resized when the keyboard shows/hides, it will affect the vh relative unit.
  • body: Only the html <body> element will be resized. Relative units are not affected, because the viewport does not change.
  • ionic: Only the html ion-app element will be resized. Only for ionic apps.
<preference name="KeyboardResizeMode" value="native" />

KeyboardStyle (for iOS only)

String ('light' by default)

Possible values

  • light
  • dark
<preference name="KeyboardStyle" value="dark" />

HideKeyboardFormAccessoryBar (for iOS only)

Boolean (true by default)

Possible values

  • true: hides the keyboard accessory bar.
  • false: shows the keyboard accessory bar.
<preference name="HideKeyboardFormAccessoryBar" value="false" />

resizeOnFullScreen (for Android only)

There is an Android bug that prevents the keyboard from resizing the WebView when the app is in full screen (i.e. if StatusBar plugin is used to hide the StatusBar). This setting, if set to true, add a workaround that resizes the WebView even when the app is in full screen.

Boolean (false by default)

Possible values

  • false: doesn't resize the WebView when the app is in full screen.
  • true: resizes the WebView when the app is in full screen.
<preference name="resizeOnFullScreen" value="true" />

Methods

Keyboard.hideFormAccessoryBar (for iOS only)

Hide the keyboard toolbar.

Set to true to hide the additional toolbar that is on top of the keyboard. This toolbar features the Prev, Next, and Done buttons.

Keyboard.hideFormAccessoryBar(value, successCallback);

Quick Example

Keyboard.hideFormAccessoryBar(true);
Keyboard.hideFormAccessoryBar(false);
Keyboard.hideFormAccessoryBar(null, (currentValue) => { console.log(currentValue); });

Keyboard.hide

Hide the keyboard

Call this method to hide the keyboard

Keyboard.hide();

Keyboard.show (for Android only)

Show the keyboard

Call this method to show the keyboard.

Keyboard.show();

Keyboard.setResizeMode (for iOS only)

Programmatically set the resize mode

Call the method with parameter to set the resize mode.

// Possible values are the same as for 'KeyboardResizeMode' preference
Keyboard.setResizeMode('native');
Keyboard.setResizeMode('body');
Keyboard.setResizeMode('ionic');

Keyboard.setKeyboardStyle (for iOS only)

Programmatically set the keyboard style

// Possible values are the same as for 'KeyboardStyle' preference
Keyboard.setKeyboardStyle('light'); // <- default
Keyboard.setKeyboardStyle('dark');

Keyboard.disableScroll (for iOS only)

Programmatically enable or disable the WebView scroll

Keyboard.disableScroll(true); // <- default
Keyboard.disableScroll(false);

Properties

Keyboard.isVisible

Determine if the keyboard is visible.

Read this property to determine if the keyboard is visible.

if (Keyboard.isVisible) {
    // do something
}

Events

keyboardDidHide

This event is fired when the keyboard is fully closed.

Attach handler to this event to be able to receive notification when keyboard is closed.

window.addEventListener('keyboardDidHide', () => {
    // Describe your logic which will be run each time keyboard is closed.
});

keyboardDidShow

This event is fired when the keyboard is fully open.

Attach handler to this event to be able to receive notification when keyboard is opened.

window.addEventListener('keyboardDidShow', (event) => {
    // Describe your logic which will be run each time when keyboard is about to be shown.
    console.log(event.keyboardHeight);
});

keyboardWillShow

This event fires before keyboard will be shown.

Attach handler to this event to be able to receive notification when keyboard is about to be shown on the screen.

window.addEventListener('keyboardWillShow', (event) => {
    // Describe your logic which will be run each time when keyboard is about to be shown.
    console.log(event.keyboardHeight);
});

keyboardWillHide

This event fires before keyboard will be closed.

Attach handler to this event to be able to receive notification when keyboard is about to be closed.

window.addEventListener('keyboardWillHide', () => {
    // Describe your logic which will be run each time when keyboard is about to be closed.
});

cordova-plugin-ionic-keyboard's People

Contributors

agrieve avatar ashearer avatar brad avatar ccorcos avatar cjpearson avatar dolgachio avatar dpogue avatar dylanvdmerwe avatar fmgasparino avatar gconnolly avatar hideov avatar jcesarmobile avatar kant2002 avatar manucorporat avatar mbackschat avatar mhartington avatar mlynch avatar mmocny avatar rahulbpatel avatar sfaizanh avatar shazron avatar spartanace1024 avatar themattray avatar xland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-ionic-keyboard's Issues

[iOS] Keyboard doesn't hide when focused inside iframe

We have an app that is partial native; a few pages have been rewritten into the app, while the other pages get loaded inside an iframe. I know this is not the way to go, but this is temporary and we didn't have much time.

We have 1 single view with an iframe. Whenever an external page (aka not implemented yet) opens, it opens that view and passes the url to the iframe.

Everything works, except the following:
If an input field gets selected inside the iframe, and the view gets closed, the keyboard doesn't hide. We tried using window['Keyboard'].hide(), which works once, but then the keyboard opens whenever the next view opens.

Versions:

Ionic:

   ionic (Ionic CLI)  : 4.5.0
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.1

---

cordova --v: 8.1.2 ([email protected])

---

"cordova-ios": "4.5.5",
"cordova-plugin-ionic-keyboard": "2.1.3",

View not resizing on iOS

Hi!

For some reason the view is not resizing on iOS for me.

I installed cordova-plugin-ionic-keyboard and I already have cordova-plugin-ionic-webview in my plugins.

I of course have the following in my config.xml:

    <preference name="KeyboardResizeMode" value="ionic" />
    <preference name="KeyboardResize" value="true" />

I also tried using native as the value for KeyboardResizeMode, all to no avail.

Any tips?

EDIT - funnily though I have another ionic project with the same config (AFAIK) and there resizing does work.

Open numeric by default on alphanumeric field

Hi,

Is it possible that when the keyboard is shown using the keyboard.show() methode, you specify which type you want, numeric in my case?
I have a field, house number, and don't want to save the extension in a separate field. But I always want to first fill in a number. and 99% of the time it even is only a number.

So is there a way to open the numeric keyboard by default, but it should be possible to switch to alphanumeric (so <input='number'> in the HTML is not possible)

java.lang.NullPointerException

App sometimes crashes.

0 java.lang.NullPointerException: 'android.view.View android.view.View.getRootView()' on a null object reference
1 at io.ionic.keyboard.IonicKeyboard$3.run(IonicKeyboard.java:69)
2 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
3 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
4 at java.lang.Thread.run(Thread.java:764)

Keyboard height observable

How do i get exact keyboard height?

Will be great to have Keyboard.height(): Observable<number> method, allows to subscribe for keyboard height changes.

This will allow to build more powerful interfaces

ionic4 install @ionic-native/keyboard is error

[ng] ERROR in node_modules/@ionic-native/keyboard/index.d.ts(2,10): error TS2305: Module '"E:/myWork/myBlogApp/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.

Ion-footer does not get pushed up when keyboard is visible (ios and android)

The toolbar remains at the bottom of the page.

This is my footer code:

<ion-footer [keyboardAttach]="content">
    <ion-toolbar>
        <button ion-button clear class="color--blue text__align--center background--light-gray position--relative" (click)="!isAttaching ? triggerFileUpload($event) : false">
        Max 50(Mb)
        </button>
        <div class="background--blue height--4 position--absolute position--bottom--0 position--left--0" [ngClass]="{'display--hidden': !isAttaching}" #loader style="width: 0px"></div>
    </ion-toolbar>
</ion-footer>

I have used these settings:

<preference name="KeyboardResize" value="true" />
<preference name="KeyboardResizeMode" value="ionic" />

And

<preference name="KeyboardResize" value="true" />
<preference name="KeyboardResizeMode" value="native" />

Alongside:

scrollPadding: true,
scrollAssist: true

None of the above did the trick.
Anybody else got another suggestion?

Autocorrect not working

From what i read autocorrect is associated to the keyboard dictionary.

But in a ion-textarea the autocorrect='"on" doesnt work. i input the directives and nothing works, but autocomplete works as it should

Keyboard does not resize content when StatusBar is hidden.

Bug Report

Ionic version:
4.0.0-rc0

Current behavior:
If StatusBar is hidden then the application content will not resize when the keyboard is shown. This leads to input elements being covered by the keyboard.

This issue affects Android. Not tested on iOS or Windows.

Expected behavior:
Application area to resize to account for keyboard.

Steps to reproduce:

  1. Create a new blank project.
ionic start test blank --type=angular
  1. Fill home page content with inputs.
<ion-header>
    <ion-toolbar>
        <ion-title>
            Ionic Blank
        </ion-title>
    </ion-toolbar>
</ion-header>

<ion-content>
    <ion-item>
        <ion-label position="stacked">Input 1</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 2</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 3</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 4</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 5</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 6</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 7</ion-label>
        <ion-input></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="stacked">Input 8</ion-label>
        <ion-input></ion-input>
    </ion-item>
</ion-content>
  1. In AppComponent, hide the StatusBar
export class AppComponent {

    constructor(
        private platform: Platform,
        private splashScreen: SplashScreen,
        private statusBar: StatusBar,
    ) {
        this.initializeApp();
    }

    initializeApp() {
        this.platform.ready().then(() => {
            this.statusBar.styleDefault();
            this.statusBar.hide();            // This line causes the problem.
            this.splashScreen.hide();
        });
    }
}
  1. Run on Android device. Click on an ion-input. Keyboard will cover some inputs. Inputs cannot be scrolled into view.

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.5.0 (C:\Users\Robert.gill\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.0
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 8 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\Robert.gill\AppData\Local\Android\Sdk)
   NodeJS            : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.1.0
   OS                : Windows 10

IOS: keyboard keep open and hide when tap text in a editable DIV

Reference from this link:
ionic-team/ionic-framework#16901

Bug Report

Ionic version:

[x] 4.6

Current behavior:

RUN on device of IOS 12.1
When tap on an editable block with HTML child content, you will find that, when tap, keyboard open, then tap, keyboard hide, and so on..

Expected behavior:

When tap on anywhere in an editable block, the keyboard should always open.

Steps to reproduce:

  1. Open an ionic v4 app in IOS.
  2. Mark up a div as following code
  3. Tap on the text in the div, watch keyboard's action.
  4. Line1: keyboard works fine. Line 2: keyboard start to dance.

Related code:

<div contentEditable style="-webkit-user-select: auto">
This is a pure text line. // line 1
<div>This is a para with embeded div tag</div> // line 2
</div>

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (/usr/local/Cellar/nvm/0.26.1/versions/node/v10.11.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-rc.0
   @angular-devkit/build-angular : 0.11.4
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 6.4.0, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.3.1, (and 15 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/netsesame/Projects/SDK/android)
   NodeJS            : v10.11.0 (/usr/local/Cellar/nvm/0.26.1/versions/node/v10.11.0/bin/node)
   npm               : 6.5.0
   OS                : macOS High Sierra
   Xcode             : Xcode 10.1 Build version 10B61

keyboard events are not being fired on Android 8.1

I am building my app on Cordova using this config in my config.xml

<feature name="CDVWKWebViewEngine">
    <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

I don't see the keyboardDidShow, keyboardWillShow or any of those events being fired. My event Listener doesn't report me anything. I am using the example event listener code. Let me know if I am missing anything on the configuration side of it.

Device: Android 8.1, One Plus 5T.

How I can use this plugin with capacitor?

I've installed this plugin with capacitor and I need to use the Preferences KeyboardResize and KeyboardResizeMode, but in capacitor I don't find the config.xml.
How I can use this plugin with capacitor?
Because when I click on input, all of the content is pulled up.
Thanks!

keyboard submit button difference iOS and Android

In Android the 'submit' button in the lower right selects the next input field, and submits the form after the last field. In iOS however, the 'return' button always submits the form directly, even when there are next input fields not yet filled in.
Is there a way to change the behaviour of the return button in iOS to behave like the one in Android?

Ionic v1 - Is keyboard attach no longer supported?

Switched over from the now deprecated ionic-plugin-keyboard, but now my keyboard does not attach to my footer bars when the "keyboard-attach" directive is used.
Is there a work around? Is anyone from the Ionic Team paying attention to this repo whatsover?

KeyboardResize => false not working on Android

I added <preference name="KeyboardResize" value="false" /> into my config.xml and it works well with IOS but not works with Android-24

As I see, it adds padding-bottom to the scroll-content class.

AVD Details

Name: Nexus_5X_API_24
Device: Nexus 5X (Google)
  Path: /Users/usr/.android/avd/Nexus_5X_API_24.avd
Target: Google Play (Google Inc.)
        Based on: Android 7.0 (Nougat) Tag/ABI: google_apis_playstore/x86
  Skin: nexus_5x
Sdcard: 100M

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0 browser 5.0.3 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v9.5.0
npm   : 5.6.0 
OS    : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Can be used with a Ionic V1 project?

Hi,

I was redirected here from the cordova-plugin-keyboard project, that I have used in my Ionic v1 project so far. Now, I'm updating Cordova to a newer version (8), and trying to update as much libraries/plugins as possible to newest versions without breaking compatibility, I realized that the mandatory cordova-plugin-ionic-webview for this to work, seems to be incompatible with Ionic v1 (deviceready is not fired in the App)... Should I stick to cordova-plugin-keyboard in my project?

Thanks!

Update @ionic-native/keyboard to this plugin

All of the new methods are not recognized, such as hideFormAccessoryBar.
ionic-native/keyboard looks like its still using the old methods so it really does not play well alongside with this new cordova plugin together. At official ionic docs site, there are still the old methods

https://ionicframework.com/docs/native/keyboard/

I do understand (and see by commits) that this will be more monitored plugin, but at this stage there are issues that needs to be addressed.

WARN: Native: tried calling Keyboard.hideKeyboardAccessoryBar, but the Keyboard plugin is not installed.

Hi, I get the following (webview and keyboard related) messages in my XCode log:

CDVWKWebViewEngine: trying to inject XHR polyfill
CDVWKWebViewEngine will reload WKWebView if required on resume
Using Ionic WKWebView
CDVIonicKeyboard: resize mode 1
[CDVTimer][keyboard] 13.301969ms
WARN: Native: tried calling Keyboard.hideKeyboardAccessoryBar, but the Keyboard plugin is not installed.
WARN: Install the Keyboard plugin: 'ionic cordova plugin add ionic-plugin-keyboard'

Checking the source code, I found out that the method is actually called hideFormAccessoryBar on iOS, doesn't work when trying to set it to false, and the whole plugin is just kind of a mess, and pull requests are being more or less ignored.

Please have a look at this. And consider adding an option to resize only the tab page content (so the tab bar doesn't show up on top of the keyboard). Until then I'll just remove this plugin.

keyboard opens while still executing keyboardWillShow handler

Normally the ion-footer is pushed up with the keyboard when this is opened, so I added logic in the keyboardWillShow for that pages of my ionic app where I don't want to show the footer when the keyboard is open.

My code is as simple as:

    this.subscrKeyboardShow = this.keyboard.onKeyboardWillShow().subscribe( () => {
      this.showFooter = false;
      this.content.resize();
    });

where the page template is:

     <ion-footer *ngIf='showFooter'>
      ....
     </ion-footer>

anyway I observed that when the keyboard is opened, a blank space as height as the footer is shown over the keyboard, so I set a breakpoint in my handler to inspect what's going on.

When debugger stopped on that line I supposed that the keyboard should not be displayed until I would let the program continue to run, but instead the keyboard suddenly opened.

IMHO the handler should be entirely executed before the keyboard is displayed on the screen, as the name of the handler suggests. Why this is not working in that way?

Keyboard events not fired on pages other than index page

I am working on a cordova application. I want to perform some functionality on keyboard events. But I am unable to call the events on pages other than index page. This is strange issue. Below are the version details,

Cordova : 6.0.0
Node: 8.2.1
iOS: 12.0.1

I have attached a sample application. If you click on the textbox on the first page(index page) then "keyboardWillShow" event gets called. But if you click on the "Go to Main" button and try to click on the textbox on main page no event gets fired.
project.zip

Difference between iOS & Android

Hi,

I'm currently maintaining an Ionic v1 app and find out that the plugin is different from iOS & Android.

In the doc, it's written that there is a method called Keyboard.hideFormAccessoryBar.

It's true for iOS but on Android, the method is called Keyboard.hideKeyboardAccessoryBar.

Would be nice to update the documentation.

Keyboard doesn't work correctly on ion footer ONLY IOS

Video of issue:

https://imgur.com/a/PRLPJYw

Description:

When opening the keyboard all the ion footer stuff disappears. Just tapping again on the field will make it appear again. Check video.
THIS DOES NOT HAPPEN ON ANDROID. Only on iOS simulator and real device
Also, if using safari development mode and inspecting elements, any css modification via safari will make the footer look good again. It seems it's the initial drawing that gets broken.

What I tried:

Adding in config.xml
<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
So ionic uses UIWebView instead of WKWebView. It works but app is very slow and other things don't work correctly as the app was built using WKWebView in mind.

Other thing that works is changing to old cordova ionic keyboard (deprecated) but when closing the keyboard all actions (button taps, navigation, etc) stops working on the app...

Tried forcing css/html rerender on keyboard opening, playing with field focus and changing between different plugin versions. Noone worked.

Code Setup:

<ion-footer *ngIf="chatSession && chatSession.IsComplete != 'True'" >
<ion-toolbar  color="white" style="border-top: 1px solid #4a87ee; min-height: 45px !important">
  <ion-grid no-padding>
    <ion-row>
        <ion-col col-1 style="margin:auto">
            <ion-icon style="padding: 5px;" name="menu" class="icon-chat" (click)="openCannedMessages()"></ion-icon>
          </ion-col>
          <ion-col col-9 style="margin:auto">
              <ion-textarea #inputRef [(ngModel)]="chatText" 
              name="chat" id="chattextarea" autocorrect="on" class="chat-area" style="padding: 0px; margin:0px" [placeholder]="this.placeholderText" ></ion-textarea>
            </ion-col>
          <ion-col col-2 style="margin:auto">
            <button ion-button outline class="btn-send" (click)="actionChat(inputRef)" style="margin: 0px; font-size: 16px;">
              <ion-label >Send</ion-label>
            </button>
          </ion-col>
    </ion-row>
  </ion-grid>
</ion-toolbar>
</ion-footer>

Ionic Info:

"@ionic-native/keyboard": "^4.15.0",
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" />
Ionic:

   ionic (Ionic CLI)  : 4.1.2 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.11

Cordova:

   cordova (Cordova CLI) : 7.1.0
   Cordova Platforms     : ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-webview 2.1.4, (and 10 other plugins)

System:

   ios-deploy : 1.9.2
   ios-sim    : 6.1.2
   NodeJS     : v8.5.0 (/usr/local/bin/node)
   npm        : 6.1.0
   OS         : macOS High Sierra
   Xcode      : Xcode 10.0 Build version 10A255

Navbar gets hidden

I have the latest plugin and when the keyboard pops up everything pushes up including the navbar.

The navbar should remain static and only the content below should scroll and resize with the keyboard. Anyone know of a preference that I am missing to achieve this?

Older versions of this plugin had a option "this.keyboard.disableScroll(true)" which prevented the navbar being hidden but that caused another issue whereby the footer that contains the input being entered into from being hidden behind the keyboard.

The behavior I am after is that they keyboard appears, the view resizes/scrolls BUT NOT the header/navbar.

keyboardDidShow event fired 3 times for third party keyboard

I had a third party keyboard, when the keyboard is shown, the keyboardDidShow is fired 3 time.

And, the original keyboard height is 216, third party keyboard height is 282. The fired event is :

fired ev.keyboardHeight is 282
fired ev.keyboardHeight is 216
fired ev.keyboardHeight is 282

and, In the screen, the height is used as 216, which is a little short, so the input field is not shown.

InAppBrowser + Keyboard Issue iOS 12 (XCode 10)

This is an issue that touches many areas so I hope placing it here is the proper place. I've cross-posted this in the cordova-ios repo and the cordova-plugin-inappbrowser repos. Since I'm utilizing Ionic's WKWebView and Keyboard, I figured posting this here might help as well.

===

When running a Cordova project from XCode 10, the Keyboard no longer resizes the height of a flexbox in an InAppBrowser window. The same project, run using XCode 9, shrinks the flexbox to accommodate the keyboard:

ios iab-keyboard

The list of plugins/platforms are as follows:

Platform

cordova-ios 4.5.5

Plugins

Relevant:

cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.2.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"

Additional:

com-intel-security-cordova-plugin 2.0.3 "APP Security API"
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-plugin-calendar 5.1.3 "Calendar"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.1.1 "cordova-plugin-googlemaps"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-vibration 3.1.0 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova.plugins.diagnostic 4.0.10 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-push 2.1.3 "PushPlugin"

Sample Project using Ionic

https://github.com/ehorodyski/iab-issue

Not resizing at all in ionic V1

Upgraded from ionic-plugin-keyboard to cordova-plugin-ionic-keyboard for my ionic V1 app and resizing is not working anymore (on IOS with WKWebView)
I've got this in config.xml

Also the events are not fired.
It's working normally with cordova-plugin-keyboard.

Is there any other steps to install it for V1 ?

Add "setResizeMode" method description to the README.md

Hey guys,
Thank you all for this awesome plugin, I appreciate what you all are doing.

Description:
Previously in #39
the new "setResizeMode" method was added.
Could we add this method description to the README.md?

If you don't mind, I will create a pull request for that, thank you!

Keyboard height is 48px too short on Samsung s8

On a Samsung S8 with Android 8 (and presumably more Samsung devices) the keyboard height is 48px too short.

It does give the correct height when I remove the fix for Android 21+, but then it gives a too large height on different devices (Nexus 5x).

Is there a different way to calculate the keyboard height?

This is with KeyboardResize false

Edit: It looks like its the bottom bar thats hidden normally, but shown when the keyboard is open. On Samsung S8, you can toggle the bottom bar visibility by double tapping the dot on the left. This plugin gives the wrong height when it's set to hidden.

Keyboard plugin over ion-list elements (does not add padding to content)

Hello,

I am using this plugin on an Ionic 3 / Angular 5 project.
I have:

scrollPadding: true,
scrollAssist: true

And also

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
    <activity android:windowSoftInputMode="adjustPan" />
</edit-config>

My code looks like this:

<ion-content>
    <ion-grid no-padding>
        <ion-row align-items-center	class="border--bottom--gray margin--bottom--10">
            <ion-col>
                <ion-searchbar class="app-searchbar" [placeholder]="'Search"
                    (ionChange)="loadUsers()" [debounce]="500" #textInput></ion-searchbar>
            </ion-col>
            <ion-col col-auto>
                <button ion-button color="blue" round outline class="width--30 height--30 padding--0" (click)="goToSelectUserType()">
                    <i class="adsicon-plus"></i>
                </button>
            </ion-col>
        </ion-row>
    </ion-grid>

    <ion-list *ngIf="!loadingService.isActive">
        <ion-item detail-none no-lines *ngFor="let user of users" (click)="select(user)">
            <ion-avatar item-left>
                <img [src]="user.prefAvatar ? user.prefAvatar : avatarPlaceholder" class="user-avatar">
            </ion-avatar>
            <button ion-button clear full>
                <div class="font__size--14">Name</div>
                <div class="font__size--12 margin--top--5">Type</div>
            </button>
        </ion-item>
    </ion-list>

    <ion-spinner *ngIf="loadingService.isActive"></ion-spinner>

    <div class="text__align--center margin--top--25" *ngIf="textInput.value.length < 3 && !users.length && !loadingService.isActive">
       Min 3 chars
    </div>
    <div class="text__align--center margin--top--25" *ngIf="textInput.value.lenght >= 3 && !users.length && !loadingService.isActive">
       No results
    </div>
</ion-content>

The problem is that no padding is added when the keyboard is open, although scrollPadding is set to true

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.