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

Skip pop-up blocker #163

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Skip pop-up blocker #163

merged 2 commits into from
Jan 19, 2024

Conversation

TimCsaky
Copy link
Contributor

@TimCsaky TimCsaky commented Jan 17, 2024

ticket: https://apps.nrs.gov.bc.ca/int/jira/browse/SHOWCASE-3508

Description

Caused by the browser settings relating to pop-ups and new tabs.

  • Edge: Pop-ups and redirects > on | off
  • chrome: Pop-ups and redirects >
    • Sites can send pop-ups and use redirects
    • Don't allow sites to send pop-ups or use redirects
  • Firefox: Block pop-up windows > on | off

mdn docs:
Modern browsers have strict popup blocker policies. Popup windows must be opened in direct response to user input, and a separate user gesture event is required for each Window.open() call.

So my proposed change is to show a toast message (in case user has permanantly blocked popups and arent aware of the cause). To allow for this, the window.open() is now invoked in the component.

commits:

  • Move window.open event to the vue component

Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Move window.open event to the vue component
Copy link

Coverage Report (Application)

Totals Coverage
Statements: 70.67% ( 53 / 75 )
Methods: 62.5% ( 5 / 8 )
Lines: 81.63% ( 40 / 49 )
Branches: 44.44% ( 8 / 18 )

Copy link

github-actions bot commented Jan 17, 2024

Coverage Report (Frontend)

Totals Coverage
Statements: 18.04% ( 617 / 3421 )
Methods: 17.05% ( 118 / 692 )
Lines: 21.98% ( 439 / 1997 )
Branches: 8.2% ( 60 / 732 )

moved window.open() to component for more control
@kyle1morel kyle1morel merged commit b7b227d into master Jan 19, 2024
19 of 20 checks passed
@kyle1morel kyle1morel deleted the popup branch January 19, 2024 00:06
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.

3 participants