Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit f89d787

Browse files
committed
allow scroll to be enabled
1 parent e6f0713 commit f89d787

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ios/IonicKeyboard.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ - (void)pluginInitialize
1717
self.hideKeyboardAccessoryBar = NO;
1818
self.disableScroll = NO;
1919

20-
self.webView.scrollView.delegate = self;
21-
2220
_keyboardShowObserver = [nc addObserverForName:UIKeyboardWillShowNotification
2321
object:nil
2422
queue:[NSOperationQueue mainQueue]
@@ -51,9 +49,11 @@ - (void)setDisableScroll:(BOOL)disableScroll
5149
}
5250
if (disableScroll){
5351
self.webView.scrollView.scrollEnabled = NO;
52+
self.webView.scrollView.delegate = self;
5453
}
5554
else {
5655
self.webView.scrollView.scrollEnabled = YES;
56+
self.webView.scrollView.delegate = nil;
5757
}
5858

5959
_disableScroll = disableScroll;
@@ -126,3 +126,4 @@ - (void) close:(CDVInvokedUrlCommand*)command
126126
}
127127

128128
@end
129+

0 commit comments

Comments
 (0)