Prevent usage of mousewheel on spinner elements

This commit is contained in:
mabashian
2019-10-07 11:28:51 -04:00
parent 9d2c877143
commit cb4a3a799e

View File

@@ -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