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

Update window open handler to accept new allowlisted protocols #152

Merged

Conversation

sergeichestakov
Copy link
Contributor

Why

Follow on to #151, I missed a spot here when I updated our allowlisted protocols to include replit:// and vscode://. We need to update the window open handler logic to match that of the will-navigate event handler to account for URLs opened via target="_blank" and programmatically via window.open. This ensures the behavior will be consistent to what we see in the will-navigate handler which fires in all other cases.

What changed

Update window open handler to accept new allowlisted protocols to match what we do in the will nav handler so that target=_blank and window.open work as expected.

Test plan

  • Open desktop app in dev
  • Open browser console
  • Enter window.open("replit://new")
  • Previously (on main) this be a no-op and not do anything
  • Now, this will open a new Replit window to the new repl flow as expected

@sergeichestakov sergeichestakov self-assigned this Mar 15, 2024
@sergeichestakov sergeichestakov requested review from a team, masad-frost and szymonkaliski and removed request for a team March 15, 2024 13:13
Copy link
Member

@szymonkaliski szymonkaliski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@sergeichestakov sergeichestakov merged commit e5998ce into main Mar 15, 2024
5 checks passed
@sergeichestakov sergeichestakov deleted the @sergeichestakov/fix-external-protocols-allow-list branch March 15, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants