Merge pull request #4583 from JDonadio/bug/input-mousewheel
Disable mousewheel on numeric input fields
This commit is contained in:
commit
8a0131dff5
10 changed files with 30 additions and 17 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue