From 45640672fe8b9cfe8a5de486d6e345919c7a36f8 Mon Sep 17 00:00:00 2001 From: Alexey Babik Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] Fix maskInputFn is ignored during the creation of the full snapshot (#1386) Fix that the optional `maskInputFn` was being accidentally ignored during the creation of the full snapshot --- .changeset/beige-olives-roll.md | 6 ++++++ packages/rrweb-snapshot/src/snapshot.ts | 2 +- packages/rrweb/src/record/index.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/beige-olives-roll.md diff --git a/.changeset/beige-olives-roll.md b/.changeset/beige-olives-roll.md new file mode 100644 index 00000000..4707f55a --- /dev/null +++ b/.changeset/beige-olives-roll.md @@ -0,0 +1,6 @@ +--- +"rrweb-snapshot": patch +"rrweb": patch +--- + +Fix that the optional `maskInputFn` was being accidentally ignored during the creation of the full snapshot diff --git a/packages/rrweb-snapshot/src/snapshot.ts b/packages/rrweb-snapshot/src/snapshot.ts index ba9ef044..00e1571c 100644 --- a/packages/rrweb-snapshot/src/snapshot.ts +++ b/packages/rrweb-snapshot/src/snapshot.ts @@ -1271,7 +1271,7 @@ function snapshot( inlineStylesheet?: boolean; maskAllInputs?: boolean | MaskInputOptions; maskTextFn?: MaskTextFn; - maskInputFn?: MaskTextFn; + maskInputFn?: MaskInputFn; slimDOM?: 'all' | boolean | SlimDOMOptions; dataURLOptions?: DataURLOptions; inlineImages?: boolean; diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index ffc6f88b..e302c0de 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -383,6 +383,7 @@ function record( inlineStylesheet, maskAllInputs: maskInputOptions, maskTextFn, + maskInputFn, slimDOM: slimDOMOptions, dataURLOptions, recordCanvas,