Open 5amfung opened 9 years ago
Anyone could comment on this?
Hi,
I am facing the same issue and was about to submit a bug :) I managed to fix the behavior by slightly updating your code. Since the only useful information is -at least in my case- the keyboardHeight, I do not forward the entire event (which would create an object with only one key: keyboardHeight), but only the keyboard height information:
var keyboardShowEvent = function (event) {
$rootScope.$evalAsync(function () {
$rootScope.$broadcast('$cordovaKeyboard:show', event.keyboardHeight);
});
};
Should I add
event
tokeyboardShowEvent()
and$broadcast()
?https://github.com/driftyco/ng-cordova/blob/master/src/plugins/keyboard.js#L8
When the keyboard opens, it does a $broadcast, but the original event object is not included. So the listener can't get the information (like keyboard height) that is embedded in the event object.
I want to make sure this is correct before I submit a pull request. Please let me know.