Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/@react-aria/utils/src/openLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ interface Modifiers {
}

export function shouldClientNavigate(link: HTMLAnchorElement, modifiers: Modifiers) {
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
let target = link.getAttribute('target');
return (
(!link.target || link.target === '_self') &&
(!target || target === '_self') &&
link.origin === location.origin &&
!link.hasAttribute('download') &&
!modifiers.metaKey && // open in new tab (mac)
Expand Down