All Projects → cjpearson → Cordova Plugin Keyboard

cjpearson / Cordova Plugin Keyboard

Keyboard Plugin for Cordova

Labels

Projects that are alternatives of or similar to Cordova Plugin Keyboard

Code Push Server
CodePush service is hot update services which adapter react-native-code-push and cordova-plugin-code-push - 热更新
Stars: ✭ 1,604 (+866.27%)
Mutual labels:  cordova
Cordova Plugin Googlemaps
Google Maps plugin for Cordova
Stars: ✭ 1,647 (+892.17%)
Mutual labels:  cordova
Cordova Plugin Console
[DEPRECATED] Apache Cordova Plugin console
Stars: ✭ 145 (-12.65%)
Mutual labels:  cordova
Ionic Typescript Starter
📱 Platform and IDE agnostic starter project for building mobile apps with Ionic and TypeScript.
Stars: ✭ 124 (-25.3%)
Mutual labels:  cordova
Involt
Inject hardware interactions directly into HTML layout.
Stars: ✭ 128 (-22.89%)
Mutual labels:  cordova
Cordova Plugin Mediapicker
cordova android ios mediaPicker support selection of multiple image and video gif ✨ cordova android 和 ios 图片视频选择cordova插件,支持多图 视频 gif,ui类似微信
Stars: ✭ 136 (-18.07%)
Mutual labels:  cordova
Cordova Plugin Vibration
Apache Cordova Plugin vibration
Stars: ✭ 109 (-34.34%)
Mutual labels:  cordova
Bibi Ionic
An mobile app of e-commerce for Ionic
Stars: ✭ 154 (-7.23%)
Mutual labels:  cordova
Cordova Plugin Globalization
Apache Cordova Plugin globalization
Stars: ✭ 131 (-21.08%)
Mutual labels:  cordova
Cordova Browser
Apache Cordova
Stars: ✭ 142 (-14.46%)
Mutual labels:  cordova
Components
MobileUI was created thinking of making your hybrid application faster and smaller since you only install what you are really going to use for UI.
Stars: ✭ 125 (-24.7%)
Mutual labels:  cordova
Ionic2 Reddit Reader
Ionic 2 Sample App
Stars: ✭ 128 (-22.89%)
Mutual labels:  cordova
Cordova Background Geolocation Services
Background Geolocation For Android and iOS
Stars: ✭ 136 (-18.07%)
Mutual labels:  cordova
Chihu2
ionic2-example <吃乎2>混合开发-美食app 🍜 ☕️ 🍦 (This is a support android and apple ionic2 case, a food app)
Stars: ✭ 124 (-25.3%)
Mutual labels:  cordova
Coding To Monetization
📖 From Coding to Monetization:Programmer's Financial Freedom Approach
Stars: ✭ 152 (-8.43%)
Mutual labels:  cordova
Cordova Plugin Wkwebview File Xhr
Cordova Plugin for WebView File XHR
Stars: ✭ 116 (-30.12%)
Mutual labels:  cordova
Fluster App
[DEPRECATED] Fluster, your simple search for roommates
Stars: ✭ 134 (-19.28%)
Mutual labels:  cordova
Cordovarduino
Cordova/Phonegap plugin for USB host serial communication from an Android device.
Stars: ✭ 156 (-6.02%)
Mutual labels:  cordova
Pychat
webchat via WebSockets/WebRTC that allows messaging/video call/screen sharing
Stars: ✭ 152 (-8.43%)
Mutual labels:  cordova
Cordova Plugin Audioinput
This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
Stars: ✭ 137 (-17.47%)
Mutual labels:  cordova

cordova-plugin-keyboard

This plugin provides the Keyboard object which has some functions to customize and control the keyboard. It also supports the HideKeyboardFormAccessoryBar (boolean) and KeyboardShrinksView (boolean) preferences in config.xml.

This plugin has only been tested in Cordova 3.2 or greater, and its use in previous Cordova versions is not recommended (potential conflict with keyboard customization code present in the core in previous Cordova versions).

If you do use this plugin in an older Cordova version (again, not recommended), you have to make sure the HideKeyboardFormAccessoryBar and KeyboardShrinksView preference values are always false, and only use the API functions to turn things on/off.

This plugin was based on this Apache project and has a compatible API.

Installation

From npm (stable)

cordova plugin add cordova-plugin-keyboard

From github latest (may not be stable)

cordova plugin add https://github.com/cjpearson/cordova-plugin-keyboard

Methods

cordova.plugins.Keyboard.shrinkView

Shrink the WebView when the keyboard comes up.

cordova.plugins.Keyboard.shrinkView(value, successCallback);

Description

Set to true to shrink the WebView when the keyboard comes up. The WebView shrinks instead of the viewport shrinking and the page scrollable. This applies to apps that position their elements relative to the bottom of the WebView. This is the default behaviour on Android, and makes a lot of sense when building apps as opposed to webpages.

Supported Platforms

  • iOS

Quick Example

cordova.plugins.Keyboard.shrinkView(true);
cordova.plugins.Keyboard.shrinkView(false);
cordova.plugins.Keyboard.shrinkView(null, function (currentValue) { console.log(currentValue); });

cordova.plugins.Keyboard.hideFormAccessoryBar

Hide the keyboard toolbar.

cordova.plugins.Keyboard.hideFormAccessoryBar(value, successCallback);

Description

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

Supported Platforms

  • iOS

Quick Example

cordova.plugins.Keyboard.hideFormAccessoryBar(true);
cordova.plugins.Keyboard.hideFormAccessoryBar(false);
cordova.plugins.Keyboard.hideFormAccessoryBar(null, function (currentValue) { console.log(currentValue); });

cordova.plugins.Keyboard.disableScrollingInShrinkView

Disable scrolling when the the WebView is shrunk.

cordova.plugins.Keyboard.disableScrollingInShrinkView(value, successCallback);

Description

Set to true to disable scrolling when the WebView is shrunk.

Supported Platforms

  • iOS

Quick Example

cordova.plugins.Keyboard.disableScrollingInShrinkView(true);
cordova.plugins.Keyboard.disableScrollingInShrinkView(false);
cordova.plugins.Keyboard.disableScrollingInShrinkView(null, function (currentValue) { console.log(currentValue); });

cordova.plugins.Keyboard.hide

Hide the keyboard

cordova.plugins.Keyboard.hide();

Description

Call this method to hide the keyboard

Supported Platforms

  • iOS
  • Android

Quick Example

cordova.plugins.Keyboard.hide();

cordova.plugins.Keyboard.show

Show the keyboard

cordova.plugins.Keyboard.show();

Description

Call this method to show the keyboard.

Supported Platforms

  • Android

Quick Example

cordova.plugins.Keyboard.show();

Properties

cordova.plugins.Keyboard.isVisible

Determine if the keyboard is visible.

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

Description

Read this property to determine if the keyboard is visible.

Supported Platforms

  • iOS

cordova.plugins.Keyboard.automaticScrollToTopOnHiding

Specifies whenether content of page would be automatically scrolled to the top of the page when keyboard is hiding.

cordova.plugins.Keyboard.automaticScrollToTopOnHiding = true;

Description

Set this to true if you need that page scroll to beginning when keyboard is hiding. This is allows to fix issue with elements declared with position: fixed, after keyboard is hiding.

Supported Platforms

  • iOS

Events

keyboardDidShow

This event is fired when keyboard fully shown.

window.addEventListener('keyboardDidShow', function () {
    // Describe your logic which will be run each time keyboard is shown.
});

Description

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

Supported Platforms

  • iOS

keyboardDidHide

This event is fired when the keyboard is fully closed.

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

Description

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

Supported Platforms

  • iOS

keyboardWillShow

This event fires before keyboard will be shown.

window.addEventListener('keyboardWillShow', function () {
    // Describe your logic which will be run each time when keyboard is about to be shown.
});

Description

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

Supported Platforms

  • iOS

keyboardWillHide

This event is fired when the keyboard is fully closed.

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

Description

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

Supported Platforms

  • iOS

keyboardHeightWillChange

This event is fired when the keyboard is fully closed.

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

Description

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

Supported Platforms

  • iOS

Releases

  • 1.0.0
    • Initial NPM release
    • Fix issues with external keyboards
    • Support keyboard events on window
    • Fix issues with split and undocked keyboards
    • Add keyboardHeightWillChange event
    • Fix issues with StatusBarOverlaysWebview
  • 1.1.0
    • Add hide/show for Android
    • Support original keyboard event mechanism
  • 1.1.1
    • Make compatible with cordova-android 3 and 4 (See #2)
    • Add hide for iOS
  • 1.1.2
    • Fix issues with hiding the accessory bar (See #3)
  • 1.1.3
    • Support hiding the accessory bar when using WKWebView as the engine (See here)
  • 1.1.4
    • Fix page scrolling (See #14)
    • Prevent possible app store rejections (See #21)
  • 1.1.5
    • Fix window.innerHeight when using WKWebView (See #32)
  • 1.2.0
    • Return current values of shrinkView, disableScroll and hideFormAccessoryBar in a success callback
    • Fix scroller resizing bug (See #55)
    • Fix iOS 11.1.1 WKWebView ShrinksView bug (See #64)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].