feat: check if parent el's tag name is a + use parent elt if true, otherwise uses the original element
This commit is contained in:
@@ -20,6 +20,8 @@ export const getRect = async (page: Page, coordinates: Coordinates) => {
|
||||
const el = document.elementFromPoint(x, y) as HTMLElement;
|
||||
if (el) {
|
||||
const { parentElement } = el;
|
||||
// Match the logic in recorder.ts for link clicks
|
||||
const element = parentElement?.tagName === 'A' ? parentElement : el;
|
||||
|
||||
}},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user