Skip to content

Commit 5daf37f

Browse files
committed
An absolutely positioned pseudo element (in a Shopify site with in an anchor) was causing us to pick a parent element of the anchor instead of the anchor itself as the click target - this doesn't change that, but ensures the sig_target is the original target
1 parent e761f73 commit 5daf37f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/rrweb/src/record/observer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ function initMouseInteractionObserver({
467467
let targetText: string | null = null;
468468

469469
let sig_target =
470-
htarget.closest &&
471-
htarget.closest(
470+
event.target.closest &&
471+
event.target.closest(
472472
'a[href],area[href],button,input[type="submit"],input[type="button"]',
473473
);
474474
if (!sig_target) {

0 commit comments

Comments
 (0)