mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed links in Portal signup terms
Because we load Portal in an iFrame the anchor tags do nto work correctly. We've intercepted all clicks on them and manually opened the URL in a new window instead.
This commit is contained in:
parent
aaaedbf715
commit
4225377436
1 changed files with 8 additions and 1 deletions
|
@ -519,8 +519,15 @@ class SignupPage extends React.Component {
|
|||
|
||||
const className = `gh-portal-signup-terms ${errorClassName}`;
|
||||
|
||||
const interceptAnchorClicks = (e) => {
|
||||
if (e.target.tagName === 'A') {
|
||||
e.preventDefault();
|
||||
window.open(e.target.href, '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={className} onClick={interceptAnchorClicks}>
|
||||
{signupTerms}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue