fix: preserve native cursor click interactions

This commit is contained in:
EtienneLescot
2026-05-05 22:55:33 +02:00
parent f91300a1b7
commit f4fc7fab9e
3 changed files with 118 additions and 0 deletions
+7
View File
@@ -281,6 +281,12 @@ function normalizeCursorSample(sample: unknown): CursorRecordingSample | null {
}
const point = sample as Partial<CursorRecordingSample>;
const interactionType =
point.interactionType === "click" ||
point.interactionType === "mouseup" ||
point.interactionType === "move"
? point.interactionType
: "move";
return {
timeMs:
typeof point.timeMs === "number" && Number.isFinite(point.timeMs)
@@ -291,6 +297,7 @@ function normalizeCursorSample(sample: unknown): CursorRecordingSample | null {
assetId: typeof point.assetId === "string" ? point.assetId : null,
visible: typeof point.visible === "boolean" ? point.visible : true,
cursorType: typeof point.cursorType === "string" ? point.cursorType : null,
interactionType,
};
}