-
Notifications
You must be signed in to change notification settings - Fork 89
Conversation
A link with target=_blank was not opening in a new tab.
@Paratron Could you review the PR? |
Merged! Interesting that no one catched this before :D |
Thank you 🙏 |
This commit introduces a syntax error (two close parens) on line Link.js:22. |
A previous commit (linked to Paratron#146) inserted an extra ')' to close the if statement, leading to a syntax error. This very simple commit fixes it.
@@ -19,7 +19,7 @@ import {navigate, getBasepath} from "./router"; | |||
*/ | |||
export const setLinkProps = (props) => { | |||
const onClick = (e) => { | |||
if (!e.shiftKey && !e.ctrlKey && !e.altKey) { | |||
if (!e.shiftKey && !e.ctrlKey && !e.altKey && props.target !== "_blank")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tugceakin Seems like you accidentally added an extra closing parantheses here )
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ogazitt Sorry I should have looked around. I only noticed it when i was fixing my issue with the ForwardRefs in Material UI.
Expected
target=_blank
attribute opens the linked document in a new window or tabActual
target=_blank
doesn't change the behavior of the link.