mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
Prevent usage of mousewheel on spinner elements
This commit is contained in:
@@ -1059,18 +1059,22 @@ function(SettingsUtils, i18n, $rootScope) {
|
|||||||
up: "Form-numberInputButton fa fa-angle-up"
|
up: "Form-numberInputButton fa fa-angle-up"
|
||||||
},
|
},
|
||||||
spin: function(e, u) {
|
spin: function(e, u) {
|
||||||
ctrl.$setViewValue(u.value);
|
if (e.originalEvent && e.originalEvent.type === 'mousewheel') {
|
||||||
ctrl.$setValidity('required', true);
|
e.preventDefault();
|
||||||
ctrl.$setValidity('min', true);
|
} else {
|
||||||
ctrl.$setValidity('max', true);
|
ctrl.$setViewValue(u.value);
|
||||||
ctrl.$dirty = true;
|
ctrl.$setValidity('required', true);
|
||||||
ctrl.$render();
|
ctrl.$setValidity('min', true);
|
||||||
if (scope.job_template_form) {
|
ctrl.$setValidity('max', true);
|
||||||
// need a way to find the parent form and mark it dirty
|
ctrl.$dirty = true;
|
||||||
scope.job_template_form.$dirty = true;
|
ctrl.$render();
|
||||||
}
|
if (scope.job_template_form) {
|
||||||
if (!scope.$$phase) {
|
// need a way to find the parent form and mark it dirty
|
||||||
scope.$digest();
|
scope.job_template_form.$dirty = true;
|
||||||
|
}
|
||||||
|
if (!scope.$$phase) {
|
||||||
|
scope.$digest();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user