mirror of
https://github.com/ansible/awx.git
synced 2026-05-24 17:17:45 -02:30
Merge pull request #4930 from mabashian/4889-number-input-scroll
Prevent usage of mousewheel on spinner elements Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -1059,6 +1059,9 @@ function(SettingsUtils, i18n, $rootScope) {
|
||||
up: "Form-numberInputButton fa fa-angle-up"
|
||||
},
|
||||
spin: function(e, u) {
|
||||
if (e.originalEvent && e.originalEvent.type === 'mousewheel') {
|
||||
e.preventDefault();
|
||||
} else {
|
||||
ctrl.$setViewValue(u.value);
|
||||
ctrl.$setValidity('required', true);
|
||||
ctrl.$setValidity('min', true);
|
||||
@@ -1073,6 +1076,7 @@ function(SettingsUtils, i18n, $rootScope) {
|
||||
scope.$digest();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// hack to get ngDisabled to work
|
||||
|
||||
Reference in New Issue
Block a user