Skip to content

Commit 7294fa5

Browse files
committed
fix(recorder): disable pagination highlighting on successful capture
1 parent c2264b6 commit 7294fa5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/browser/BrowserWindow.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,9 @@ export const BrowserWindow = () => {
13951395
};
13961396
isDOMMode?: boolean;
13971397
}) => {
1398+
if (paginationMode && paginationSelector) {
1399+
return;
1400+
}
13981401
if (!getText && !getList) {
13991402
setHighlighterData(null);
14001403
return;
@@ -1519,13 +1522,17 @@ export const BrowserWindow = () => {
15191522
socket,
15201523
listSelector,
15211524
paginationMode,
1525+
paginationSelector,
15221526
paginationType,
15231527
limitMode,
15241528
cachedChildSelectors,
15251529
]
15261530
);
15271531

15281532
const highlighterHandler = useCallback((data: { rect: DOMRect, selector: string, elementInfo: ElementInfo | null, childSelectors?: string[], isDOMMode?: boolean; }) => {
1533+
if (paginationMode && paginationSelector) {
1534+
return;
1535+
}
15291536
if (isDOMMode || data.isDOMMode) {
15301537
domHighlighterHandler(data);
15311538
return;
@@ -1680,6 +1687,7 @@ export const BrowserWindow = () => {
16801687
highlighterData.isShadow
16811688
);
16821689
socket?.emit("setPaginationMode", { pagination: false });
1690+
setHighlighterData(null);
16831691
}
16841692
return;
16851693
}
@@ -1918,6 +1926,7 @@ export const BrowserWindow = () => {
19181926
highlighterData.isShadow
19191927
);
19201928
socket?.emit("setPaginationMode", { pagination: false });
1929+
setHighlighterData(null);
19211930
}
19221931
return;
19231932
}

0 commit comments

Comments
 (0)