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

Commit ef4dcb8

Browse files
committed
add disableScroll
1 parent def1a75 commit ef4dcb8

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/ios/IonicKeyboard.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- (void) resizeView:(CDVInvokedUrlCommand*)command;
1212
- (void) hideKeyboardAccessoryBar:(CDVInvokedUrlCommand*)command;
1313
- (void) close:(CDVInvokedUrlCommand*)command;
14+
- (void) disableScroll:(CDVInvokedUrlCommand*)command;
1415

1516
@end
1617

src/ios/IonicKeyboard.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,10 @@ - (void) close:(CDVInvokedUrlCommand*)command
126126
[self.webView endEditing:YES];
127127
}
128128

129+
- (void) disableScroll:(CDVInvokedUrlCommand*)command
130+
{
131+
self.webView.scrollView.scrollEnabled = NO;
132+
}
133+
129134

130135
@end

www/keyboard.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ var argscheck = require('cordova/argscheck'),
2626
var Keyboard = function() {
2727
};
2828

29-
Keyboard.resizeView = function(scroll) {
30-
exec(null, null, "Keyboard", "resizeView", [scroll]);
29+
Keyboard.resizeView = function(offset) {
30+
exec(null, null, "Keyboard", "resizeView", [offset]);
3131
};
3232

3333
Keyboard.hideKeyboardAccessoryBar = function(hide) {
@@ -38,6 +38,9 @@ Keyboard.close = function() {
3838
exec(null, null, "Keyboard", "close", []);
3939
};
4040

41+
Keyboard.disableScroll = function() {
42+
exec(null, null, "Keyboard", "disableScroll", []);
43+
};
4144

4245
module.exports = Keyboard;
4346
});

0 commit comments

Comments
 (0)