Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/ios/CDVIonicKeyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ - (void)onKeyboardWillShow:(NSNotification *)note
[self setKeyboardHeight:height delay:duration+0.2];
[self resetScrollView];
}

[self setKeyboardStyle:self.keyboardStyle];

NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnShowing(%d);", (int)height];
Expand Down Expand Up @@ -216,9 +216,9 @@ - (void)_updateFrame
{
CGSize statusBarSize = [[UIApplication sharedApplication] statusBarFrame].size;
int statusBarHeight = MIN(statusBarSize.width, statusBarSize.height);

int _paddingBottom = (int)self.paddingBottom;

if (statusBarHeight == 40) {
_paddingBottom = _paddingBottom + 20;
}
Expand All @@ -230,14 +230,14 @@ - (void)_updateFrame
case ResizeBody:
{
NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnResize(%d, %d, document.body);",
_paddingBottom, (int)f.size.height];
_paddingBottom, (int)(f.size.height - wf.origin.y)];
[self.commandDelegate evalJs:js];
break;
}
case ResizeIonic:
{
NSString *js = [NSString stringWithFormat:@"Keyboard.fireOnResize(%d, %d, document.querySelector('ion-app'));",
_paddingBottom, (int)f.size.height];
_paddingBottom, (int)(f.size.height - wf.origin.y)];
[self.commandDelegate evalJs:js];
break;
}
Expand All @@ -261,12 +261,12 @@ - (void)setKeyboardStyle:(NSString*)style
}) : imp_implementationWithBlock(^(id _s) {
return UIKeyboardAppearanceLight;
});

if (self.isWK) {
for (NSString* classString in @[WKClassString, UITraitsClassString]) {
Class c = NSClassFromString(classString);
Method m = class_getInstanceMethod(c, @selector(keyboardAppearance));

if (m != NULL) {
method_setImplementation(m, newImp);
} else {
Expand All @@ -278,7 +278,7 @@ - (void)setKeyboardStyle:(NSString*)style
for (NSString* classString in @[UIClassString, UITraitsClassString]) {
Class c = NSClassFromString(classString);
Method m = class_getInstanceMethod(c, @selector(keyboardAppearance));

if (m != NULL) {
method_setImplementation(m, newImp);
} else {
Expand Down