From 4ba3fd84bffcb7c36f7f6d5a883cd6ec1cf5644d Mon Sep 17 00:00:00 2001 From: re-fort Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] fix: change default value of input type from null to text (#1200) * fix: change default value of input type from null to text * Apply formatting changes * add changeset * add a comment related to the type of input element --- packages/rrweb-snapshot/src/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rrweb-snapshot/src/utils.ts b/packages/rrweb-snapshot/src/utils.ts index a443cb96..110cf1a7 100644 --- a/packages/rrweb-snapshot/src/utils.ts +++ b/packages/rrweb-snapshot/src/utils.ts @@ -256,6 +256,7 @@ export function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean { * where passwords should be masked. */ export function getInputType(element: HTMLElement): Lowercase | null { + // when omitting the type of input element(e.g. ), the type is treated as text const type = (element as HTMLInputElement).type; return element.hasAttribute('data-rr-is-password')