disable mousewheel on numeric input fields

This commit is contained in:
Javier 2016-07-12 11:13:15 -03:00
commit 93b543e878
2 changed files with 17 additions and 4 deletions

View file

@ -325,4 +325,17 @@ angular.module('copayApp.directives')
replace: true,
templateUrl: 'views/includes/available-balance.html'
}
})
.directive('ignoreMouseWheel', function($rootScope, $timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('mousewheel', function(event) {
element[0].blur();
$timeout(function() {
element[0].focus();
}, 1);
});
}
}
});