IMask.js - Unable to get property 'SavePersonalAndPaymentData'
Andrew Mclaughlin
I encountered an error using Imask in Edge. Masked inputs, despite being filled, are blocked as required by the browser. I have two errors in the console:
Unable to get property 'SavePersonalAndPaymentData' of undefined or null reference Unable to get property 'isPersonal' of undefined or null referenceThe error occurred in the Autoformfill_ContentScript.js file, which is the native Edge browser module. Is it possible to work around this problem or disable the module so that the form is not blocked?
1 Answer
According to the error message, it seems that the IMask.js is not load success or the html element is not found. So, it doesn't contain the related property.
Try to use F12 developer tools to check whether the IMask.js file load success, and set debugger check the JavaScript code make sure you could find the element. Besides, please add the IMask.js reference before getting element and attach the IMask function, and make sure you could get the elements.
Here is sample about using IMask.js, please refer to it (this sample code works well in IE 11, the legacy version of Edge, New Edge and Chrome browser.):
<!--add IMask reference-->
<script src=""></script>
<input type="text" value="" />
<script> var element = document.getElementById('selector'); var maskOptions = { mask: '+{7}(000)000-00-00' }; var mask = IMask(element, maskOptions);
</script>Finally, if still not working, can you post the Enough code to reproduce the problem as in Minimal, Complete, and Verifiable example.