-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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
2.0.0-alpha.17
Expected Behavior
I have a React app that controls a textarea
by setting the value
prop. RRWeb records the attribute change as well as the change
event. The data looks like
Attribute change event:
{
"adds": [],
"attributes": [
{
"attributes": {
"value": "(903) 993-7305"
},
"id": 121
}
],
"removes": [],
"source": 0,
"texts": []
}
Input change event:
{
"id": 121,
"isChecked": false,
"source": 5,
"text": "**************"
}
I am expecting the attributes.value
to be masked.
Actual Behavior
The attributes.value
is unmasked. The issue appears to be in genTextAreaValueMutation
, specifically the code
item.attributes.value = Array.from(
dom.childNodes(textarea),
(cn) => dom.textContent(cn) || '',
).join('');
There doesn't appear to be any masking logic that is applied to this value (or upstream of this function).
Steps to Reproduce
Create a controlled textarea
in React.
Testcase Gist URL
No response
Additional Information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working