[Bug]: maskInputFn is not called on inputs
ericmeadows opened this issue · comments
Preflight Checklist
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
What package is this bug report for?
rrweb-snapshot
Version
v1.1.3
Expected Behavior
I have created a maskInputFn
, which should print the element, as well as ignore hidden elements...
Actual Behavior
No console logs appear, and the hidden fields come through, unmasked..
Steps to Reproduce
I have created a maskInputFn
, which I would assume would sanitize my inputs, but the data is coming through...
Here's maskInputFn
:
function maskInputFn(text, element) {
console.log("element", element);
if (element.type === "hidden") {
return "";
}
// Default to returning the original text
return text;
}
Here's the initialization:
rrwebRecord({
emit(event) {
console.log("emitting");
cacheEvents(event);
},
maskInputOptions: { maskInputFn },
maskInputFn
});
Testcase Gist URL
No response
Additional Information
This is extremely important for us to handle...