Hello @andreas , this code will prevent the mouse wheel from manipulating a number input field. Paste it into the Javascript tab and change the component #. If anyone knows how to apply this layout wide instead of component by component let me know!
// Prevent number input with mouse wheel
TB.render('component_3', function(data) {
// Disable mouse wheel for number inputs only when they are focused
$('.t-form-number').on('wheel', function(event) {
if ($(this).is(':focus')) {
event.preventDefault();
// Allow page smooth scrolling even when the mouse is in the focused field
let delta = event.originalEvent.deltaY;
window.scrollTo({
top: window.scrollY + delta,
behavior: 'smooth'
});
}
});
});
it does deactivate scroll wheel input on hover, which is already a big improvement, but when the field is focused the scrolling still acts as an input…
ahhh okay. I just copied and pasted and put it on the layout js tab, cause I never want that for any component. didn’t even realize it component based…