I have noSpace directive which basically just to prevent the space bar to be entered inside password field (input type="password" no-space)
When i deploy the app is using cordova on android space bar is still allowed, though i tried on 4.4.2 it works fine. I also tried the same using emulator on 4.4.2 (and device) it works
element.bind("keydown", function(e){
if (e.keyCode === 32 ){
e.preventDefault();
e.stopPropagation();
}
Is this a bug in 4.4.4 ?
I was mistaken on my previous answer so i'll just explain one of the ways i'd implement it, which may work.
<input type="text" ng-keydown="disableSpaces($event)">
<script>
function ctrl($scope){
$scope.disableSpaces = function($event){
if($event.keyCode === 32) $event.preventDefault();
}
}
</script>
Cheers!