Recently for some reason, our phone number fields changed from type phone number to single-line text. We still do not know what caused this, but it's something internal with HubSpot as we didn't change anything.
When we re-added phone number fields, we have this problem with the masking:
Our masking script is glitching where the spaces disappear, and when I type another character/key after the last number, it adds the spacing back in again. But when I submit, the spaces disappear and the validation script fails.
I've tried various things: upgraded our jQuery version, upgraded the jQuery masking script, did some troubleshooting but our scripts *work*, I've also tried to use these scripts locally outside of HubSpot and they work. So I'm not sure what's failing.
There are two scripts — fields_mask.js and mobile-signup-button.js
These scripts used to work fine but for some reason, particularly fields_mask.js, they are now failing.