Skip to content

Commit

Permalink
Fix e.detail.keyboardHeight undefined error in keyboardAttach direc…
Browse files Browse the repository at this point in the history
…tive

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.
  • Loading branch information
jtomaszewski committed Sep 14, 2015
1 parent 2c706c7 commit a3924cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/angular/directive/keyboardAttach.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ IonicModule
}

//for testing
var keyboardHeight = e.keyboardHeight || e.detail.keyboardHeight;
var keyboardHeight = e.keyboardHeight || (e.detail && e.detail.keyboardHeight);
element.css('bottom', keyboardHeight + "px");
scrollCtrl = element.controller('$ionicScroll');
if (scrollCtrl) {
Expand Down

0 comments on commit a3924cb

Please sign in to comment.