Skip to content

[Bug]: maskInputFn is ignored during the creation of the full snapshot #1385

@ababik

Description

@ababik

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

Version

2.0.0-alpha.11

Expected Behavior

The maskInputFn setting must be applied for masking during the creation of the full snapshot.

Actual Behavior

The maskInputFn setting is ignored.

Steps to Reproduce

  1. Create a simple page that contains an input with some value. E.g.
<body>
    <input type="text" value="some text value">
</body>
  1. Configure recorder to mask all elements except specified in the maskInputFn
maskAllInputs: true,
maskInputFn(value, element) {
  // ... the logic to skip masking for our text input
  return value;
}
  1. Record the page loading and replay events.
    The initial input's text is masked in the recorded video. The element only gets unmasked if you start editing its value.

Testcase Gist URL

No response

Additional Information

I checked the code and it looks like maskInputFn setting is ignored for the full snapshot creation.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions