FIX: Correctly intercept `<a href target="_self"` (#22077)
`_self` is the default, so we should treat it the same as having no value specified. This fixes navigation to links like `/my/...` in custom sidebar links.
This commit is contained in:
parent
9bbfb6e171
commit
0790e9f4f1
|
@ -24,11 +24,13 @@ export default function interceptClick(e) {
|
|||
|
||||
const currentTarget = e.currentTarget;
|
||||
const href = currentTarget.getAttribute("href");
|
||||
const linkTarget = currentTarget.getAttribute("target");
|
||||
const targettingOtherFrame = linkTarget && linkTarget !== "_self";
|
||||
|
||||
if (
|
||||
!href ||
|
||||
href.startsWith("#") ||
|
||||
currentTarget.getAttribute("target") ||
|
||||
targettingOtherFrame ||
|
||||
currentTarget.dataset.emberAction ||
|
||||
currentTarget.dataset.autoRoute ||
|
||||
currentTarget.dataset.shareUrl ||
|
||||
|
|
Loading…
Reference in New Issue