Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close the redirect dialog after you follow the redirect #29407

Merged
merged 1 commit into from Jun 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/src/applab/ExternalRedirectDialog.jsx
Expand Up @@ -21,6 +21,11 @@ class ExternalRedirectDialog extends React.Component {
redirects: PropTypes.array
};

handleRedirect(url) {
window.open(url, '_blank');
this.props.handleClose();
}

render() {
let title, body, footer;
if (!(this.props.redirects && this.props.redirects.length > 0)) {
Expand Down Expand Up @@ -52,8 +57,7 @@ class ExternalRedirectDialog extends React.Component {
color={Button.ButtonColor.gray}
/>
<Button
href={url}
target={'_blank'}
onClick={() => this.handleRedirect(url)}
text={i18n.continue()}
color={Button.ButtonColor.orange}
/>
Expand Down