From 8ddd4a0eb6bb876ed3e7ed0eba6757903fca6758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Netto?= Date: Tue, 9 Oct 2018 17:26:33 -0300 Subject: [PATCH] Adds support for input[type="tel"] Supports decimal keyboard on input type="tel" fields --- src/ios/CDVDecimalKeyboard.m | 61 ++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/src/ios/CDVDecimalKeyboard.m b/src/ios/CDVDecimalKeyboard.m index 9db40c8..232c434 100644 --- a/src/ios/CDVDecimalKeyboard.m +++ b/src/ios/CDVDecimalKeyboard.m @@ -26,8 +26,8 @@ - (void)pluginInitialize { selector:@selector(appDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; - - + + } - (void) appWillResignActive: (NSNotification*) n{ isAppInBackground = YES; @@ -38,7 +38,7 @@ - (void) appDidBecomeActive: (NSNotification*) n{ if(isAppInBackground==YES){ isAppInBackground = NO; [self processKeyboardShownEvent]; - + } } @@ -71,22 +71,22 @@ - (void) addDecimalButton{ forControlEvents:UIControlEventTouchDown]; [decimalButton addTarget:self action:@selector(buttonPressCancel:) forControlEvents:UIControlEventTouchUpOutside]; - - + + decimalButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; [decimalButton setTitleEdgeInsets:UIEdgeInsetsMake(-20.0f, 0.0f, 0.0f, 0.0f)]; [decimalButton setBackgroundColor: [UIColor colorWithRed:210/255.0 green:213/255.0 blue:218/255.0 alpha:1.0]]; - + // locate keyboard view UIWindow* tempWindow = nil; NSArray* openWindows = [[UIApplication sharedApplication] windows]; - + for(UIWindow* object in openWindows){ if([[object description] hasPrefix:@"