Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
cordova-plugin-ebw-ionic-keyboard
Advanced tools
This plugin has been designed to work seamlessly with cordova-plugin-ionic-webview
, so make sure you have it installed first:
cordova plugin add cordova-plugin-ionic-keyboard --save
Boolean (true by default)
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" />
String ('native' by default)
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" />
String ('light' by default)
light
dark
<preference name="KeyboardStyle" value="dark" />
Boolean (true by default)
true
: hides the keyboard accessory bar.false
: shows the keyboard accessory bar.<preference name="HideKeyboardFormAccessoryBar" value="false" />
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)
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" />
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);
Keyboard.hideFormAccessoryBar(true);
Keyboard.hideFormAccessoryBar(false);
Keyboard.hideFormAccessoryBar(null, (currentValue) => { console.log(currentValue); });
Hide the keyboard
Call this method to hide the keyboard
Keyboard.hide();
Show the keyboard
Call this method to show the keyboard.
Keyboard.show();
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');
Programmatically set the keyboard style
// Possible values are the same as for 'KeyboardStyle' preference
Keyboard.setKeyboardStyle('light'); // <- default
Keyboard.setKeyboardStyle('dark');
Programmatically enable or disable the WebView scroll
Keyboard.disableScroll(true); // <- default
Keyboard.disableScroll(false);
Determine if the keyboard is visible.
Read this property to determine if the keyboard is visible.
if (Keyboard.isVisible) {
// do something
}
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.
});
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);
});
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);
});
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.
});
2.2.0 (2019-09-03)
FAQs
Ionic Keyboard Plugin
We found that cordova-plugin-ebw-ionic-keyboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.