Skip to content

Commit a3924cb

Browse files
committed
Fix e.detail.keyboardHeight undefined error in keyboardAttach directive
My background: - newest ionic - newest ionic cordova keyboard plugin installed - iOS 8 + iPhone 5C - debugging through Safari Emulator What happens: When focusing on the input in `<ion-footer-bar keyboard-attach>`, I get a `TypeError: undefined is not an object (evaluating 'e.detail.keyboardHeight')` error. This bugfix fixes it.
1 parent 2c706c7 commit a3924cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: js/angular/directive/keyboardAttach.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ IonicModule
4646
}
4747

4848
//for testing
49-
var keyboardHeight = e.keyboardHeight || e.detail.keyboardHeight;
49+
var keyboardHeight = e.keyboardHeight || (e.detail && e.detail.keyboardHeight);
5050
element.css('bottom', keyboardHeight + "px");
5151
scrollCtrl = element.controller('$ionicScroll');
5252
if (scrollCtrl) {

0 commit comments

Comments
 (0)