@moodlehq/cordova-plugin-ionic-keyboard 2.2.0-moodle.1 → 2.2.0-moodle.3

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 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.1
22
+ cordova plugin add @moodlehq/cordova-plugin-ionic-keyboard@2.2.0-moodle.3
23
23
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moodlehq/cordova-plugin-ionic-keyboard",
3
- "version": "2.2.0-moodle.1",
3
+ "version": "2.2.0-moodle.3",
4
4
  "description": "Moodle's fork of Ionic Keyboard Plugin",
5
5
  "scripts": {
6
6
  "release": "standard-version -a",
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.1">
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">
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
- if (self.keyboardResizes != ResizeNone) {
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,7 +245,12 @@ NSString* UITraitsClassString;
247
245
  break;
248
246
  }
249
247
  default:
248
+ {
249
+ NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnResize(%d, %d, null);",
250
+ _paddingBottom, (int)(f.size.height - wf.origin.y)];
251
+ [self.commandDelegate evalJs:js];
250
252
  break;
253
+ }
251
254
  }
252
255
  [self resetScrollView];
253
256
  }
@@ -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) {