@moodlehq/cordova-plugin-ionic-keyboard 2.2.0-moodle.1 → 2.2.0-moodle.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/src/ios/CDVIonicKeyboard.m +4 -3
- package/www/ios/keyboard.js +3 -3
package/README.md
CHANGED
|
@@ -19,5 +19,5 @@ You can see all the changes here: [master...moodlemobile:master](https://github.
|
|
|
19
19
|
You can install this package using the [original installation instructions](https://github.com/ionic-team/cordova-plugin-ionic-keyboard#installation), but installing this package instead:
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
cordova plugin add @moodlehq/cordova-plugin-ionic-keyboard@2.2.0-moodle.
|
|
22
|
+
cordova plugin add @moodlehq/cordova-plugin-ionic-keyboard@2.2.0-moodle.2
|
|
23
23
|
```
|
package/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
|
|
3
|
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="@moodlehq/cordova-plugin-ionic-keyboard" version="2.2.0-moodle.
|
|
3
|
+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="@moodlehq/cordova-plugin-ionic-keyboard" version="2.2.0-moodle.2">
|
|
4
4
|
<name>cordova-plugin-ionic-keyboard</name>
|
|
5
5
|
<description>Ionic Keyboard Plugin</description>
|
|
6
6
|
<license>Apache 2.0</license>
|
|
@@ -189,9 +189,7 @@ NSString* UITraitsClassString;
|
|
|
189
189
|
|
|
190
190
|
- (void)setKeyboardHeight:(int)height delay:(NSTimeInterval)delay
|
|
191
191
|
{
|
|
192
|
-
|
|
193
|
-
[self setPaddingBottom: height delay:delay];
|
|
194
|
-
}
|
|
192
|
+
[self setPaddingBottom: height delay:delay];
|
|
195
193
|
}
|
|
196
194
|
|
|
197
195
|
- (void)setPaddingBottom:(int)paddingBottom delay:(NSTimeInterval)delay
|
|
@@ -247,6 +245,9 @@ NSString* UITraitsClassString;
|
|
|
247
245
|
break;
|
|
248
246
|
}
|
|
249
247
|
default:
|
|
248
|
+
NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnResize(%d, %d, null);",
|
|
249
|
+
_paddingBottom, (int)(f.size.height - wf.origin.y)];
|
|
250
|
+
[self.commandDelegate evalJs:js];
|
|
250
251
|
break;
|
|
251
252
|
}
|
|
252
253
|
[self resetScrollView];
|
package/www/ios/keyboard.js
CHANGED
|
@@ -58,6 +58,9 @@ Keyboard.fireOnShowing = function (height) {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
Keyboard.fireOnResize = function (height, screenHeight, ele) {
|
|
61
|
+
// Update the CSS variable with the height of the keyboard.
|
|
62
|
+
document.documentElement.style.setProperty('--keyboard-height', `${height}px`);
|
|
63
|
+
|
|
61
64
|
if (!ele) {
|
|
62
65
|
return;
|
|
63
66
|
}
|
|
@@ -66,9 +69,6 @@ Keyboard.fireOnResize = function (height, screenHeight, ele) {
|
|
|
66
69
|
} else {
|
|
67
70
|
ele.style.height = (screenHeight - height) + 'px';
|
|
68
71
|
}
|
|
69
|
-
|
|
70
|
-
// Update the CSS variable with the height of keyboard.
|
|
71
|
-
document.documentElement.style.setProperty('--keyboard-height', height > 0 ? `${height}px` : null);
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
Keyboard.hideFormAccessoryBar = function (hide, success) {
|