Its so frustrating when pasting content in, and it getting rejected due to a space at the start/end of the copied string. How it /usr/local/hestia/web/js/dist/main.min.js compiled? I can’t find a non-minified version ?
I don’t think we include the building on production servers.
If you put it in /web/js/custom_scripts
And change it to:
function trimInput(){
document.querySelectorAll(‘input[type=“text”]’).forEach((input) => {
input.addEventListener(‘change’, function(){
this.value=this.value.trim();
});
});
}
document.onload = trimInput;
Thanks - think I’ll wait on the next release Good to know its implemented though - its been a PITA a few times now where I’ve missed leading/trailing spaces from a copy and paste, so this should save 1 step